summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rwxr-xr-xjjb/fuel/fuel-build.sh7
-rwxr-xr-xjjb/fuel/fuel-download-artifact.sh9
-rwxr-xr-xjjb/fuel/fuel-upload-artifact.sh6
-rw-r--r--jjb/fuel/fuel.yml16
4 files changed, 26 insertions, 12 deletions
diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh
index 178a50c68..63a62f497 100755
--- a/jjb/fuel/fuel-build.sh
+++ b/jjb/fuel/fuel-build.sh
@@ -12,7 +12,12 @@ echo
[[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
# set OPNFV_ARTIFACT_VERSION
-export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
+if [[ $GERRIT_EVENT_TYPE = "change-merged" ]]; then
+ echo "Building Fuel ISO for a merged change"
+ OPNFV_ARTIFACT_VERSION=$(gerrit-$GERRIT_CHANGE_NUMBER)
+else
+ OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
+fi
# start the build
cd $WORKSPACE/$INSTALLER/ci
diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh
index 6eb1ba463..7ebc0d6d0 100755
--- a/jjb/fuel/fuel-download-artifact.sh
+++ b/jjb/fuel/fuel-download-artifact.sh
@@ -3,8 +3,13 @@ set -o errexit
set -o nounset
set -o pipefail
-# get the latest.properties file in order to get info regarding latest artifact
-curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
+if [[ $GERRIT_EVENT_TYPE = "change-merged" ]]; then
+ # get the properties file for the Fuel ISO built for a merged change
+ curl -s -o $WORKSPACE/opnfv-gerrit-$GERRIT_CHANGE_NUMBER.properties http://$GS_URL/latest.properties
+else
+ # get the latest.properties file in order to get info regarding latest artifact
+ curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
+fi
# check if we got the file
[[ -f latest.properties ]] || exit 1
diff --git a/jjb/fuel/fuel-upload-artifact.sh b/jjb/fuel/fuel-upload-artifact.sh
index 3b700c649..a4bf32cf4 100755
--- a/jjb/fuel/fuel-upload-artifact.sh
+++ b/jjb/fuel/fuel-upload-artifact.sh
@@ -14,7 +14,11 @@ 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 $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
+if [[ ! $GERRIT_EVENT_TYPE = "change-merged" ]]; then
+ gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
+else
+ echo "Uploaded Fuel ISO for a merged change"
+fi
echo
echo "--------------------------------------------------------"
diff --git a/jjb/fuel/fuel.yml b/jjb/fuel/fuel.yml
index 1f53454e3..1625124f6 100644
--- a/jjb/fuel/fuel.yml
+++ b/jjb/fuel/fuel.yml
@@ -222,10 +222,10 @@
builders:
- shell:
!include-raw ./fuel-build.sh
-# - shell:
-# !include-raw ./fuel-upload-artifact.sh
-# - shell:
-# !include-raw ./fuel-workspace-cleanup.sh
+ - shell:
+ !include-raw ./fuel-upload-artifact.sh
+ - shell:
+ !include-raw ./fuel-workspace-cleanup.sh
- job-template:
name: 'fuel-merge-virtual-deploy-{stream}'
@@ -281,12 +281,12 @@
dependency-jobs: 'fuel-merge-build-{stream}'
builders:
-# - shell:
-# !include-raw ./fuel-download-artifact.sh
+ - shell:
+ !include-raw ./fuel-download-artifact.sh
- shell:
!include-raw ./fuel-virtual-deploy.sh
-# - shell:
-# !include-raw ./fuel-workspace-cleanup.sh
+ - shell:
+ !include-raw ./fuel-workspace-cleanup.sh
- job-template:
name: 'fuel-daily-{stream}'