Enable Artifact signing for Compass 65/16865/1
authorAric Gardner <agardner@linuxfoundation.org>
Wed, 13 Jul 2016 19:41:57 +0000 (15:41 -0400)
committerAric Gardner <agardner@linuxfoundation.org>
Wed, 13 Jul 2016 19:48:26 +0000 (15:48 -0400)
The change to gpg_import_key is just so that I could +x it.

Change-Id: I647d0586e7c5f653f6c1a479db2b1c75c4620064
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
jjb/compass4nfv/compass-upload-artifact.sh
utils/gpg_import_key.sh [changed mode: 0644->0755]

index 34b1db9..73b7f07 100644 (file)
@@ -10,6 +10,27 @@ echo
 # source the opnfv.properties to get ARTIFACT_VERSION
 source $BUILD_DIRECTORY/opnfv.properties
 
+# clone releng repository
+echo "Cloning releng repository..."
+[ -d releng ] && rm -rf releng
+git clone https://gerrit.opnfv.org/gerrit/releng $WORKSPACE/releng/ &> /dev/null
+#this is where we import the siging key
+if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then
+  source $WORKSPACE/releng/utils/gpg_import_key.sh
+fi
+
+signiso () {
+time gpg2 -vvv --batch --yes --no-tty \
+  --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
+  --passphrase besteffort \
+  --detach-sig $BUILD_DIRECTORY/compass.iso
+
+gsutil cp $BUILD_DIRECTORY/compass.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig
+echo "ISO signature Upload Complete!"
+}
+
+signiso
+
 # upload artifact and additional files to google storage
 gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
old mode 100644 (file)
new mode 100755 (executable)
index 3afeda8..80b7c39
@@ -40,3 +40,4 @@ else
      rm -f "$NODE_NAME"-subkey
    fi
 fi
+