Set nocache for fuel artifacts on artifacts.opnfv.org 89/4989/2
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Mon, 21 Dec 2015 23:41:05 +0000 (00:41 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 22 Dec 2015 00:30:32 +0000 (00:30 +0000)
Change-Id: I41d19eadbe151e27146e8aa5e8a1b7f250865edb
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/fuel/fuel-ci-jobs.yml
jjb/fuel/fuel-deploy.sh
jjb/fuel/fuel-download-artifact.sh
jjb/fuel/fuel-upload-artifact.sh

index 564c89c..fa0f666 100644 (file)
             refspec: ''
             branch: '{branch}'
 
+    wrappers:
+        - build-name:
+            name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Feature: $OPNFV_FEATURE'
+
     builders:
         - shell:
             !include-raw ./fuel-download-artifact.sh
index d797cf9..bd2db3e 100755 (executable)
@@ -17,8 +17,7 @@ mkdir -p $TMPDIR
 chmod a+x $HOME
 chmod a+x $TMPDIR
 
-# set CONFDIR, BRIDGE
-POD_CONF_DIR=$WORKSPACE/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
+# set BRIDGE
 BRIDGE=pxebr
 
 # clone genesis repo and checkout the SR1 tag
index 79f4119..917bc97 100755 (executable)
@@ -4,10 +4,12 @@ set -o nounset
 set -o pipefail
 
 if [[ "$JOB_NAME" =~ "merge" ]]; then
+    echo "Downloading http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties"
     # get the properties file for the Fuel ISO built for a merged change
     curl -s -o $WORKSPACE/latest.properties http://$GS_URL/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties
 else
     # get the latest.properties file in order to get info regarding latest artifact
+    echo "Downloading http://$GS_URL/latest.properties"
     curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
 fi
 
index 1350abd..d72cefb 100755 (executable)
@@ -12,14 +12,26 @@ echo
 source $WORKSPACE/opnfv.properties
 
 # upload artifact and additional files to google storage
-gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
-gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
+gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
+gsutil cp $WORKSPACE/opnfv.properties \
+    gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
 if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
-    gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
+    gsutil cp $WORKSPACE/opnfv.properties \
+    gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
 elif [[ "$JOB_NAME" =~ "merge" ]]; then
     echo "Uploaded Fuel ISO for a merged change"
 fi
 
+gsutil -m setmeta \
+    -h "Content-Type:text/html" \
+    -h "Cache-Control:private, max-age=0, no-transform" \
+    gs://$GS_URL/*.properties
+
+gsutil -m setmeta \
+    -h "Cache-Control:private, max-age=0, no-transform" \
+    gs://$GS_URL/*.iso
+
 echo
 echo "--------------------------------------------------------"
 echo "Done!"