Skip to content
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

Automate protection/unprotection of master during release #257

Open
Mierdin opened this issue Feb 27, 2017 · 5 comments
Open

Automate protection/unprotection of master during release #257

Mierdin opened this issue Feb 27, 2017 · 5 comments

Comments

@Mierdin
Copy link
Member

Mierdin commented Feb 27, 2017

We should look into unprotecting and protecting master programmatically. Several workflows in st2cd push directly to master in a few repos - and currently we have to unprotect (and more importantly remember to re-protect) manually.

@arm4b
Copy link
Member

arm4b commented Jun 20, 2017

+1 on this.

It will also help us to automate st2cicd node creation and committing new Terraform resources to ops-infra. At the moment we need to sync up 3 places: st2cicd, ops-infra master and ops-infra NOMERGE/build-node cc @bigmstone

@bigmstone
Copy link
Contributor

I'm -1 to protect/unprotect. I'd rather programmatically create a PR, approve it, and merge it. This will keep a better audit trail and easier to parse diff in github. I'm going to attempt to tackle this in st2cicd and see what the limitations are. If successful someone can copy the method over for release mgmt.

@Mierdin
Copy link
Member Author

Mierdin commented Aug 10, 2017

Agreed, creation of a PR would be a better way to go, just a bit more work

@arm4b
Copy link
Member

arm4b commented Nov 21, 2017

This definitely should be automated, since applying this manually is error-prone:

note the ci/circleci: deploy (required) task which was included by mistake by the release manager during master unprotection/protection.

@arm4b
Copy link
Member

arm4b commented May 11, 2018

We just have found a possible easy solution for this issue.

For branch protection, Github has an option to enforce status checks for Administrators.
If unchecked, repo administrator (esteetew during the release automation) can push directly to master.


... the only problem is that everyone is administrator.

At least release automation can check/uncheck only one single setting, instead of unprotecting entire branch configuration.

It's 1 simple API (boolean) call:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants