I’m trying to move my org into a more gitops workflow. I was thinking a good way to do promotions between environments would be to auto sync based on PR label.
Thinking about it though, because you can apply the same label multiple times to different PRs, I can see situations where there would be conflicts. Like a PR is labeled “qa” so that its promoted to the qa env, automated testing is started, a different change is ready, the PR is labeled “qa”, and it would sync overwriting the currently deployed version in qa. I obviously don’t want this.
Is there a way to enforce only single instances of a label on a PR across a repository? Or maybe there is some kind a queue system out there that I’m not aware of?
I’m using github, argocd, and circleci.
I’ve done something similar. In my case it was a startup script that did something like the following:
git fetch
for your main development branch (the one you perform the real merges to) and allpull/
refs (git does not do this by default; you’ll have to set them up for your local test repo. Note that you want to refer to the unmerged commits for these)git bisect
for this since you explicitly do not want to try commit from the middle of a PR. It might be simpler to whitelist or blacklist one commit at a time, but if you’re failing here remember that all tests are unreliable.