-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOP-5317: Populate-metadata extension supports content-repo-sourced deployments #64
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for redoc-extension canceled.
|
✅ Deploy Preview for snooty-cache-extension canceled.
|
✅ Deploy Preview for populate-data-extension ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for git-changed-file-extension canceled.
|
✅ Deploy Preview for redirects-and-publish-extension canceled.
|
✅ Deploy Preview for search-manifest-extension canceled.
|
✅ Deploy Preview for persistence-module-ext canceled.
|
✅ Deploy Preview for slack-deploy-extension canceled.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good! minor comments on removed logic and a follow up ticket for same file pathing configs
@@ -84,26 +87,18 @@ const cloneContentRepo = async ({ | |||
branchName: string; | |||
orgName: string; | |||
}) => { | |||
if (fs.existsSync(repoName)) { | |||
if (fs.existsSync(`${repoName}`)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor. is this necessary to interpolate here
await run.command(`rm -r ${repoName}`); | ||
} | ||
|
||
await run.command( | ||
`git clone -b ${branchName} --recurse-submodules https://${process.env.GITHUB_BOT_USERNAME}:${process.env.GITHUB_BOT_PWD}@github.com/${orgName}/${repoName}.git -s`, | ||
`git clone -b ${branchName} https://${process.env.GITHUB_BOT_USERNAME}:${process.env.GITHUB_BOT_PWD}@github.com/${orgName}/${repoName}.git -s`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq - why did we get rid of this option --recurse-submodules
); | ||
|
||
// Remove git config as it stores the connection string in plain text | ||
if (fs.existsSync(`${repoName}/.git/config`)) { | ||
await run.command(`rm -r ${repoName}/.git/config`); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this not necessary anymore?
await run.command(`rm -r ${repoName}`); | ||
} | ||
|
||
await run.command( | ||
`git clone -b ${branchName} --recurse-submodules https://${process.env.GITHUB_BOT_USERNAME}:${process.env.GITHUB_BOT_PWD}@github.com/${orgName}/${repoName}.git -s`, | ||
`git clone -b ${branchName} https://${process.env.GITHUB_BOT_USERNAME}:${process.env.GITHUB_BOT_PWD}@github.com/${orgName}/${repoName}.git -s`, | ||
); | ||
|
||
// Remove git config as it stores the connection string in plain text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also wondering if we can replace the contents of said doc to ./
folder of runner so that the structure is the same as a docs content repo.
this will be saving as:
| snooty
| -- cloud-docs
| ---- source
| ------ index.html
whereas the builds on docs sites have the structure:
| cloud-docs
| -- source
| ---- index.html
| -- snooty
we can make this a follow up ticket to keep the file structure the same
: (process.env.BRANCH_NAME ?? (configEnvironment.BRANCH as string)); | ||
const repoName = | ||
process.env.REPO_NAME ?? | ||
(process.env.REPOSITORY_URL?.split('/')?.pop() as string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor. should we be reading from configEnvironment here as well
Ticket
DOP-5317 Populate-metadata extension supports content-repo-sourced deployments
Notes
Changes how populate-metadata netlify extension populates build environment env variables,. to support the transition to content-repo sourced deploys in dotcomstg, dotcomprd
Deployed version of populate-metadata extension
Docs build