Merge "fuel: Enable triggers of Colorado on zte-pod1 and zte-pod3"
[releng.git] / jjb / apex / apex-upload-artifact.sh
index ba69f3e..0dd112b 100755 (executable)
@@ -11,14 +11,20 @@ echo
 # source the opnfv.properties to get ARTIFACT_VERSION
 source $WORKSPACE/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
-source $WORKSPACE/releng/utils/gpg_import_key.sh
+if [ -f $WORKSPACE/releng/utils/gpg_import_key.sh ]; then 
+  source $WORKSPACE/releng/utils/gpg_import_key.sh
+fi
 
 signrpm () {
 for artifact in $RPM_LIST $SRPM_LIST; do
   echo "Signing artifact: ${artifact}"
-  gpg2 -vvv --batch \
-    --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
+  gpg2 -vvv --batch --yes --no-tty \
+    --default-key opnfv-helpdesk@rt.linuxfoundation.org \
     --passphrase besteffort \
     --detach-sig $artifact
     gsutil cp "$artifact".sig gs://$GS_URL/$(basename "$artifact".sig)
@@ -27,9 +33,9 @@ done
 }
 
 signiso () {
-time gpg2 -vvv --batch \
+time gpg2 -vvv --batch --yes --no-tty \
   --default-key opnfv-helpdesk@rt.linuxfoundation.org  \
-  --passphrase notreallysecure \
+  --passphrase besteffort \
   --detach-sig $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso
 
 gsutil cp $BUILD_DIRECTORY/release/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso.sig gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso.sig