-
Notifications
You must be signed in to change notification settings - Fork 546
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 |
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
@@ -37,6 +37,9 @@ dist_file_signed="${dist_file:?}.asc" | |||
|
|||
"${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.sh
script, which mirrors the existinggarasign_dist_file.sh
script.The
garasign-git
Artifactory image provides an environment wheregit
commands may be executed using the same Release Signing Key provided bygarasign-gpg
, which is currently used bygarasign_dist_file.sh
to sign the release tarball. This allows us to create a GPG-signed release tag usinggit tag --sign
in 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.name
anduser.email
Git 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 tag
command is preceeded by agpg --list-keys <KeyID>
to validate the key we intend to use is indeed provided by thegarasign-git
environment. The expected output of thegarasign-git
command looks as follows (the "Success!" is from the implicitgpgloader
command preceeding evaluation ofPLUGIN_COMMANDS
):The
git tag
command 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, theGNUPGHOME
environment variable is used to directgit verify-tag
to use the temporary (otherwise empty) keyring.Mirroring usage of the existing
garasign_dist_file.sh
script, the newgarasign_release_tag.sh
script is invoked by./etc/make_release.py
. This meansmake_release.py
now 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-gpg
image before use (as in silkbomb commands).