fixes some of the error catching in the auto increment release script
eliminates tmp file name collisions and adds tmp cleanup to more cases
adds more verbose output to make it easier to see what the script is doing, and to see where it may be failing
deletes any created tags if the tags are created but the release creation fails.
(Note that this is the exact same PR as #1242, but since that was opened from a fork, some of our Jenkins checks wouldn't work, so had to open this instead. Good to know for next time!)
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
Is the level of detail in the snippets below adequate?
Any unaddressed concerns or pain points?
Validation
Ran this without issue in the forked repo:
➜ bluebutton-web-server git:(master) ✗ ./ops/build_autoincrement_release.sh
Build auto increment release...
Pushing new tag
Enumerating objects: 1, done.
Counting objects: 100% (1/1), done.
Writing objects: 100% (1/1), 806 bytes | 806.00 KiB/s, done.
Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/jimmyfagan/bluebutton-web-server.git
* [new tag] r2 -> r2
Release created successfully: https://github.com/jimmyfagan/bluebutton-web-server/releases/tag/r2
Additionally did some testing by using this script in the main repo with my SSO deauthorized and got this:
➜ bluebutton-web-server git:(master) ✗ ./ops/build_autoincrement_release.sh
Build auto increment release...
Error during release creation, dumping debug output!
Release JSON payload:
{
"tag_name": "r129",
"name": "r129",
"body": "r129 - 2024-09-06\n================\n\n- BB2-3327: Fix date comparisons in selenium tests (#1240) ",
"draft": false,
"prerelease": false
}
Release API status:
{
"message": "Resource protected by organization SAML enforcement. You must grant your Personal Access token access to this organization.",
"documentation_url": "https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/",
"status": "403"
}
Rolling back pushed tag
To https://github.com/CMSgov/bluebutton-web-server
- [deleted] r129
Deleting local tag
Deleted tag 'r129' (was ed11736f)
Previously that case would have reported "Release created successfully"
What Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
Adds any new software dependencies
Modifies any security controls
Adds new transmission or storage of data
Any other changes that could possibly affect security?
[ ] Yes, one or more of the above security implications apply. This PR must not be merged without the ISSO or team
security engineer's approval.
Any Migrations?
[ ] Yes, there are migrations
[ ] The migrations should be run PRIOR to the code being deployed
[ ] The migrations should be run AFTER the code is deployed
[ ] There is a more complicated migration plan (downtime,
etc)
JIRA Ticket: BB2-3357
What Does This PR Do?
(Note that this is the exact same PR as #1242, but since that was opened from a fork, some of our Jenkins checks wouldn't work, so had to open this instead. Good to know for next time!)
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
Validation
Ran this without issue in the forked repo:
Additionally did some testing by using this script in the main repo with my SSO deauthorized and got this:
Previously that case would have reported "Release created successfully"
What Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
Adds any new software dependencies
Modifies any security controls
Adds new transmission or storage of data
Any other changes that could possibly affect security?
[ ] Yes, one or more of the above security implications apply. This PR must not be merged without the ISSO or team security engineer's approval.
Any Migrations?