-
Notifications
You must be signed in to change notification settings - Fork 0
chore/DO-1952: Create Pipe to Migrate Secret Variables #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
base: main
Are you sure you want to change the base?
Conversation
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.
Small readme change
| ### Migrating Multiple Environments | ||
| You can create separate pipeline steps for each environment: |
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 the plan for the migration script to add this automatically? Cause that would be ideal 🤞
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.
Yeah that was the plan.
I haven't looked into the low level implementation, but we already parse through the Bitbucket Repo and curate a dict of Secret Variables for each Environment.
We can then use this dict, to write a new bitbucket-pipeline.yml file, following the example, and then push this pipeline to a new branch like migrate-secrets (labelling the old pipeline file with something like yml.bak). We can then get DO intervention to confirm the secrets and Github Repo destination to send the secrets to, and run the pipeline manually to send the secrets over. I feel like DO intervention here might be needed given the severity of some of the secrets being migrated?
In terms of the $GITHUB_TOKEN, I am currently scoping some Fine Grained permissions to strip it down to the required permissions, and we could potentially store it as a Bitbucket Organisation Var, but I feel that that's risky. On the other hand, the migrate.py script could just use the token from the DO to add to the Bitbucket repo as a Repo Variable, and then use that
README.md
Outdated
| - step: | ||
| name: Migrate Repository Secrets | ||
| script: | ||
| - pipe: your-workspace/migrate-secrets-pipe:latest |
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.
We can change the name of this to be aligent/migrate-secrets-pipe (provided that's what it's actually called in docker hub)
Description of the proposed changes
Screenshots (if applicable)

Other solutions considered (if any)
N/A
Notes to PR author
Notes to reviewers
ℹ️ When you've finished leaving feedback, please add a final comment to the PR tagging the author, letting them know that you have finished leaving feedback