summaryrefslogtreecommitdiffstats
path: root/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-07-28 09:55:24 +0200
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>2016-08-05 11:25:59 +0000
commit48e9188db830c825c5212969e3cf85c055002f3c (patch)
tree3a6df2a05d979cf81d6e2a7ce7ed976ff5d3d020 /jjb/kvmfornfv/kvmfornfv-download-artifact.sh
parentbd35a079af75875da3ca438527899c6cb7ea7b74 (diff)
kvmfornfv: Create daily job and enable artifact upload
Change-Id: I75b9bb58b3413514b1e3fea63185e210f56de95a Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'jjb/kvmfornfv/kvmfornfv-download-artifact.sh')
-rwxr-xr-xjjb/kvmfornfv/kvmfornfv-download-artifact.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/jjb/kvmfornfv/kvmfornfv-download-artifact.sh b/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
index 875f42921..89b7e3164 100755
--- a/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
+++ b/jjb/kvmfornfv/kvmfornfv-download-artifact.sh
@@ -7,16 +7,20 @@ else
exit 1
fi
-if [[ "$JOB_TYPE" == "verify" ]]; then
- echo "Downloading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..."
- GS_URL="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER"
-else
- echo "Artifact download is not enabled for $JOB_TYPE jobs"
- exit 1
-fi
+# do stuff differently based on the job type
+case "$JOB_TYPE" in
+ verify)
+ echo "Downloading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..."
+ GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER"
+ ;;
+ *)
+ echo "Artifact download is not enabled for $JOB_TYPE jobs"
+ exit 1
+esac
/bin/mkdir -p $WORKSPACE/build_output
-gsutil cp -r $GS_URL/* $WORKSPACE/build_output > $WORKSPACE/gsutil.log 2>&1
+gsutil cp -r $GS_UPLOAD_LOCATION/* $WORKSPACE/build_output > $WORKSPACE/gsutil.log 2>&1
+
echo "--------------------------------------------------------"
ls -al $WORKSPACE/build_output
echo "--------------------------------------------------------"