feat: add support for tag tracking#897
Open
davidspek wants to merge 10 commits into
Open
Conversation
Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
✅ Deploy Preview for opal-docs canceled.
|
Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
ac094dc to
d75ecdd
Compare
Signed-off-by: David van der Spek <david.vanderspek@flyrlabs.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support for tracking Git tags instead of branches. It is a revival of #517 with some additions to add support for tags in the OPAL scopes as well.
Fixes Issue
Changes proposed
Why tracking git tags instead of branch
In a way this could be considered "against" how git is supposed to be used - some say tags should be immutable. However, mutable tags are defacto sometimes used, the most clear example being using a "latest" tag or a "v1-latest" tag.
Using tags this way could let you use a policy repo with a single base branch, while still giving control of what is rolled out in each env. Consider the traditional dev/prod setup:
devinstance of OPAL is tracking the base branch (ex.master)prodinstance of OPAL is tracking aprodtag which can be moved at will once the changes in dev/master is tested properly.This current way of doing this is to have multiple long lived branches in the same repo - this can be cumbersome and lead to a bunch of manual merging of branches.
Changes
POLICY_REPO_TAGand cli arg--policy-repo-tag, defaulting to None. When used, OPAL will track the tag.POLICY_REPO_TAGandPOLICY_REPO_MAIN_BRANCHThe two variables are obviously dependent on eachother. My idea was to not break default behaviour.
masterbranchCheck List (Check all the applicable boxes)
Screenshots
Note to reviewers