Fix import key release jobs 99/61699/1 v0.43.0
authorJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 11 Sep 2019 20:17:37 +0000 (13:17 -0700)
committerJessica Wagantall <jwagantall@linuxfoundation.org>
Wed, 11 Sep 2019 20:17:37 +0000 (13:17 -0700)
Import GPG signing key before verifying Gerrit
tag details.

Change-Id: I132fb8dbba51de995b0e42765344bf218340415c
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
releasenotes/notes/fix-import-sigul-key-release-904e6d1668a8db33.yaml [new file with mode: 0644]
shell/release-job.sh

diff --git a/releasenotes/notes/fix-import-sigul-key-release-904e6d1668a8db33.yaml b/releasenotes/notes/fix-import-sigul-key-release-904e6d1668a8db33.yaml
new file mode 100644 (file)
index 0000000..c9ad303
--- /dev/null
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    Import GPG signing key in release jobs before verifying Gerrit tag details.
index 785bda4..72b3bae 100644 (file)
@@ -119,6 +119,8 @@ verify_version(){
 }
 
 tag(){
+    # Import public signing key
+    gpg --import "$SIGNING_PUBKEY"
     if git tag -v "$VERSION"; then
         echo "---> OK: Repo already tagged $VERSION Continuting to release"
     else
@@ -126,7 +128,6 @@ tag(){
         git tag -am "${PROJECT//\//-} $VERSION" "$VERSION"
         sigul --batch -c "$SIGUL_CONFIG" sign-git-tag "$SIGUL_KEY" "$VERSION" < "$SIGUL_PASSWORD"
         echo "Showing latest signature for $PROJECT:"
-        gpg --import "$SIGNING_PUBKEY"
         echo "git tag -v $VERSION"
         git tag -v "$VERSION"