-
Notifications
You must be signed in to change notification settings - Fork 548
CXX-3002 update release instructions to support signed release tags #1388
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
Conversation
|
Note: this PR proposes using |
kevinAlbs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a small fix.
Moving the tagging steps into scripts seems like a bonus simplification to the release process.
etc/garasign_dist_file.sh
Outdated
| "${launcher:?}" login --password-stdin --username "${ARTIFACTORY_USER:?}" artifactory.corp.mongodb.com <<<"${ARTIFACTORY_PASSWORD:?}" | ||
|
|
||
| # Ensure latest version of Garasign is being used. | ||
| podman pull artifactory.corp.mongodb.com/release-tools-container-registry-local/garasign-gpg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| podman pull artifactory.corp.mongodb.com/release-tools-container-registry-local/garasign-gpg | |
| "${launcher:?}" pull artifactory.corp.mongodb.com/release-tools-container-registry-local/garasign-gpg |
etc/garasign_release_tag.sh
Outdated
| "${launcher:?}" login --password-stdin --username "${ARTIFACTORY_USER:?}" artifactory.corp.mongodb.com <<<"${ARTIFACTORY_PASSWORD:?}" | ||
|
|
||
| # Ensure latest version of Garasign is being used. | ||
| podman pull artifactory.corp.mongodb.com/release-tools-container-registry-local/garasign-git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| podman pull artifactory.corp.mongodb.com/release-tools-container-registry-local/garasign-git | |
| "${launcher:?}" pull artifactory.corp.mongodb.com/release-tools-container-registry-local/garasign-git |
This PR attempts to implement the "signed release tag" requirement of the new Repository and Commit Security policy. This is primarily accomplished by the new
garasign_release_tag.shscript, which mirrors the existinggarasign_dist_file.shscript.The
garasign-gitArtifactory image provides an environment wheregitcommands may be executed using the same Release Signing Key provided bygarasign-gpg, which is currently used bygarasign_dist_file.shto sign the release tarball. This allows us to create a GPG-signed release tag usinggit tag --signin a manner which satisfies the policy requirements while (hopefully) minimizing disruption to the release process or regular development. (We do not want to impose any GPG key management overhead if possible.)Note
Unfortunately, it seems the
user.nameanduser.emailGit config options must be manually set for the command to succeed despite the information being present in the signing key specified via--local-user <KeyID>.The
git tagcommand is preceeded by agpg --list-keys <KeyID>to validate the key we intend to use is indeed provided by thegarasign-gitenvironment. The expected output of thegarasign-gitcommand looks as follows (the "Success!" is from the implicitgpgloadercommand preceeding evaluation ofPLUGIN_COMMANDS):The
git tagcommand is followed by a sanity-check that the newly-created git tag is indeed signed as it should be with the GPG key that is provided by https://pgp.mongodb.com/. To avoid interference with local keyrings, theGNUPGHOMEenvironment variable is used to directgit verify-tagto use the temporary (otherwise empty) keyring.Mirroring usage of the existing
garasign_dist_file.shscript, the newgarasign_release_tag.shscript is invoked by./etc/make_release.py. This meansmake_release.pynow handles the creation of the (signed) release tag rather than the user. The release instructions have been updated accordingly.This PR also contains the following drive-by improvements/fixes:
garasign-gpgimage before use (as in silkbomb commands).