summaryrefslogtreecommitdiffstats
path: root/jjb/genesis
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2015-04-01 12:49:16 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2015-04-01 12:52:21 +0200
commita94d9b7a026ca5ca2808a08491d35e8892a12329 (patch)
tree64ce5ca9edb341d876db7f321afa159e68b83ac2 /jjb/genesis
parentc7048ee6f80ccf09aa445a40e5e2b034ebaf6c0d (diff)
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 <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/genesis')
-rw-r--r--jjb/genesis/genesis.yml34
1 files changed, 33 insertions, 1 deletions
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: