Add support to change main branch on bootstrap and pipelines repositories #508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why?
We set a goal to remove the word
master
from our repository as much as possible. The bootstrap repository initialized to themaster
branch by default and creates pull requests against themaster
branch too.Additionally, the CodePipeline should monitor the correct branch to perform the changes required when the main branch gets updated.
What?
For any new installation, the bootstrap repository should default to the
main
branch.While any existing installation of ADF should allow the administrators to move to the
main
branch easily.To enable this, when ADF is updated, it will perform a check which branch is configured as the default branch on the repository (
aws-deployment-framework-bootstrap
andaws-deployment-framework-pipelines
). It will create the pull request against the default branch if it needs to be updated.If you want to switch from one branch to another, you need to create a new branch from the current default branch.
For example, switching from
master
tomain
:Simply running these commands from inside the
aws-deployment-framework-bootstrap
oraws-deployment-framework-pipelines
repository that is cloned locally should do it:Navigate to the CodeCommit repository and update the default branch of the repository to the new branch. Make sure to click the
Save
button underneath the default branch setting to save it.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.