6 if [[ "$JOB_NAME" =~ (verify|merge|daily|weekly) ]]; then
7 JOB_TYPE=${BASH_REMATCH[0]}
9 echo "Unable to determine job type!"
13 # do stuff differently based on the job type
16 echo "Downloading artifacts for the change $GERRIT_CHANGE_NUMBER. This could take some time..."
17 GS_UPLOAD_LOCATION="gs://artifacts.opnfv.org/$PROJECT/review/$GERRIT_CHANGE_NUMBER"
20 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
21 source $WORKSPACE/latest.properties
22 GS_UPLOAD_LOCATION=$OPNFV_ARTIFACT_URL
23 echo "Downloading artifacts from $GS_UPLOAD_LOCATION for daily run. This could take some time..."
26 echo "Artifact download is not enabled for $JOB_TYPE jobs"
30 GS_GUESTIMAGE_LOCATION="gs://artifacts.opnfv.org/$PROJECT/guest-image"
31 /bin/mkdir -p $WORKSPACE/build_output
32 gsutil cp -r $GS_UPLOAD_LOCATION/* $WORKSPACE/build_output > $WORKSPACE/gsutil.log 2>&1
33 gsutil cp $GS_GUESTIMAGE_LOCATION/guest1.sha512 $WORKSPACE/build_output > $WORKSPACE/gsutil.log 2>&1
35 echo "--------------------------------------------------------"
36 ls -al $WORKSPACE/build_output
37 echo "--------------------------------------------------------"
39 echo "Downloaded artifacts!"