Skip to content

Commit

Permalink
use in-memory key variant
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJuge committed Jan 17, 2024
1 parent c78c60b commit c0d034d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .buildkite/hooks/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export KEY_ID_SECRET
# Import the key into the keyring
echo "$KEYPASS_SECRET" | gpg --batch --import "$KEY_FILE"

# Export the key in ascii armored format
gpg --enarmor ${KEY_FILE}
SECRING_ASC="$(cat "$KEY_FILE.asc")"
export SECRING_ASC


echo "--- Configure git context :git:"
# Configure the committer since the maven release requires to push changes to GitHub
# This will help with the SLSA requirements.
Expand Down
1 change: 0 additions & 1 deletion .ci/snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ chmod 600 ${folder}/gpg/gpg.conf
./gradlew \
--debug \
--console=plain \
-Psigning.gnupg.optionsFile=${folder}/gpg/gpg.conf \
clean ${publishArg} \
| tee snapshot.txt
4 changes: 2 additions & 2 deletions agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ publishing {
}

signing {
// use gpg agent
useGpgCmd()
// use in-memory ascii-armored key in enviroment variables
useInMemoryPgpKeys(System.getenv("KEY_ID_SECRET"), System.getenv("SECRING_ASC"), System.getenv("KEYPASS_SECRET"))
sign publishing.publications.agentJar
}

0 comments on commit c0d034d

Please sign in to comment.