Last active
June 12, 2019 18:56
-
-
Save trlinkin/94dd9dd6e696646f9a5cf9e561c7a8b6 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
secret=`/bin/cat /secret/data` | |
curl --request POST --header "PRIVATE-TOKEN: $secret" 'https://tom-gitlab.classroom.puppet.com/api/v4/projects/1/protected_branches?name=production&push_access_level=40&merge_access_level=40&unprotect_access_level=40' | |
/bin/echo "\nProtected Production Env" |
This file contains 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
#!/bin/bash | |
secret=`/bin/cat /secret/data` | |
/bin/curl --request DELETE --header "PRIVATE-TOKEN: $secret" 'https://tom-gitlab.classroom.puppet.com/api/v4/projects/1/protected_branches/production' | |
/bin/echo "UN - Protected Production Env" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment