diff options
author | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2016-07-28 09:55:24 +0200 |
---|---|---|
committer | Fatih Degirmenci <fatih.degirmenci@ericsson.com> | 2016-08-05 11:25:59 +0000 |
commit | 48e9188db830c825c5212969e3cf85c055002f3c (patch) | |
tree | 3a6df2a05d979cf81d6e2a7ce7ed976ff5d3d020 /jjb/kvmfornfv/kvmfornfv-upload-artifact.sh | |
parent | bd35a079af75875da3ca438527899c6cb7ea7b74 (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-upload-artifact.sh')
-rwxr-xr-x | jjb/kvmfornfv/kvmfornfv-upload-artifact.sh | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh index 339d260e3..190ab4b4d 100755 --- a/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh +++ b/jjb/kvmfornfv/kvmfornfv-upload-artifact.sh @@ -7,20 +7,27 @@ else exit 1 fi -if [[ "$JOB_TYPE" == "verify" ]]; then - echo "Uploading 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 upload is not enabled for $JOB_TYPE jobs" - exit 1 -fi +case "$JOB_TYPE" in + verify) + echo "Uploading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..." + GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER" + ;; + daily) + echo "Uploding daily artifacts This could take some time..." + OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") + GS_UPLOAD_LOCATION="gs://$GS_URL/$OPNFV_ARTIFACT_VERSION" + ;; + *) + echo "Artifact upload is not enabled for $JOB_TYPE jobs" + exit 1 +esac -gsutil cp -r $WORKSPACE/build_output $GS_URL > $WORKSPACE/gsutil.log 2>&1 +gsutil cp -r $WORKSPACE/build_output $GS_UPLOAD_LOCATION > $WORKSPACE/gsutil.log 2>&1 gsutil -m setmeta -r \ -h "Cache-Control:private, max-age=0, no-transform" \ - $GS_URL > /dev/null 2>&1 + $GS_UPLOAD_LOCATION > /dev/null 2>&1 -gsutil ls $GS_URL > /dev/null 2>&1 +gsutil ls $GS_UPLOAD_LOCATION > /dev/null 2>&1 if [[ $? -ne 0 ]]; then echo "Problem while uploading artifacts!" echo "Check log $WORKSPACE/gsutil.log on $NODE_NAME" |