From 04a31c06280769d1a209affa78839c48d850a434 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Mon, 15 May 2017 15:01:19 -0400 Subject: Apex: fix apex upload for images Change-Id: Ibff76b1ce7cb4e071e576fd111bfff8af2cc2021 Signed-off-by: Tim Rozet --- jjb/apex/apex-upload-artifact.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'jjb') diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index c8862964c..f543e2d1b 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -15,7 +15,9 @@ echo BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY -source $BUILD_DIRECTORY/../opnfv.properties +if [[ ! "$ARTIFACT_VERSION" =~ dev ]]; then + source $BUILD_DIRECTORY/../opnfv.properties +fi importkey () { # clone releng repository @@ -85,7 +87,8 @@ uploadsnap () { uploadimages () { # Uploads dev tarball - export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}${GERRIT_PATCHSET_NUMBER}" + GERRIT_PATCHSET_NUMBER=$(echo $GERRIT_REFSPEC | grep -Eo '[0-9]+$') + export OPNFV_ARTIFACT_VERSION="dev${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}" echo "Uploading development build tarball" pushd $BUILD_DIRECTORY > /dev/null tar czf apex-${OPNFV_ARTIFACT_VERSION}.tar.gz *.qcow2 -- cgit 1.2.3-korg