From: Fatih Degirmenci Date: Wed, 1 Apr 2015 10:49:16 +0000 (+0200) Subject: Enable artifact upload for genesis/fuel X-Git-Tag: arno.2015.1.0~148 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=a94d9b7a026ca5ca2808a08491d35e8892a12329;p=releng.git Enable artifact upload for genesis/fuel Upload fuel build artifacts and files that contain build information to OPNFV Google Storage. JIRA: OCTO-26 Change-Id: I9f36ee339656eaebf9682d93c950e1b7f1266f84 Signed-off-by: Fatih Degirmenci --- diff --git a/jjb/genesis/genesis.yml b/jjb/genesis/genesis.yml index 544b146d3..a987ff76b 100644 --- a/jjb/genesis/genesis.yml +++ b/jjb/genesis/genesis.yml @@ -159,6 +159,11 @@ - string: name: BUILD_DIRECTORY default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + - string: + name: GS_URL + default: 'artifacts.opnfv.org/genesis/{installer}' + description: "URL to Google Storage." - string: name: INSTALLER default: '{installer}' @@ -280,11 +285,38 @@ # do the build cd $WORKSPACE/fuel/ci - ./build.sh -f t -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY + ./build.sh -f t -v $BUILD_ID -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY + + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + set -x # list the build artifacts ls -al $BUILD_DIRECTORY + cd $BUILD_DIRECTORY + + # save information regarding artifact into file + ( + echo "GIT_URL=$(git config --get remote.origin.url)" + echo "SHA1=$(git rev-parse HEAD)" + echo "ARTIFACT_URL=$GS_URL/opnfv-$BUILD_ID.iso" + echo "BUILD_URL=$BUILD_URL" + echo "BUILD=OK" + ) > opnfv-$BUILD_ID.properties + + # copy artifact property file as latest.properties + # so we can directly get info regarding latest artifact + /bin/cp -f opnfv-$BUILD_ID.properties latest.properties + + # upload artifact and additional files to google storage + gsutil cp opnfv-$BUILD_ID.iso gs://$GS_URL/opnfv-$BUILD_ID.iso + gsutil cp opnfv-$BUILD_ID.properties gs://$GS_URL/opnfv-$BUILD_ID.properties + gsutil cp latest.properties gs://$GS_URL/latest.properties + - builder: name: opensteak-verify builders: