Apex: Fix usage of gpg key import 79/58879/1
authorTim Rozet <trozet@redhat.com>
Thu, 21 Jun 2018 17:56:02 +0000 (13:56 -0400)
committerTim Rozet <trozet@redhat.com>
Thu, 21 Jun 2018 17:56:02 +0000 (13:56 -0400)
Removes using source to call the gpg import script. source will execute
the script in the current shell, which will exit the artifact upload.
Adds checking to make sure we ignore any failure with running the
script.

Change-Id: I587cf9584f9fa8c4d315b7b2328a6c7c55ae3b88
Signed-off-by: Tim Rozet <trozet@redhat.com>
jjb/apex/apex-upload-artifact.sh

index 8743368..6acb2a5 100755 (executable)
@@ -24,7 +24,9 @@ importkey () {
   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
+    if ! $WORKSPACE/releng/utils/gpg_import_key.sh; then
+      echo "WARNING: Failed to run gpg key import"
+    fi
   fi
 }