Check job name to decide what to do with fuel artifacts 71/3471/4
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 20 Nov 2015 13:28:03 +0000 (14:28 +0100)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Fri, 20 Nov 2015 13:54:56 +0000 (13:54 +0000)
fuel-verify-virtual-deploy-master job is also removed for the timebeing.

Change-Id: I744830cf377791ad0edf3f8c38012b01b6cd80cd
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/fuel/fuel-build.sh
jjb/fuel/fuel-download-artifact.sh
jjb/fuel/fuel-upload-artifact.sh
jjb/fuel/fuel.yml

index 63a62f4..7b1d851 100755 (executable)
@@ -12,7 +12,7 @@ echo
 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
 
 # set OPNFV_ARTIFACT_VERSION
-if [[ $GERRIT_EVENT_TYPE = "change-merged" ]]; then
+if [[ "$JOB_NAME" =~ "merge" ]]; then
     echo "Building Fuel ISO for a merged change"
     OPNFV_ARTIFACT_VERSION=$(gerrit-$GERRIT_CHANGE_NUMBER)
 else
index 7ebc0d6..9adb546 100755 (executable)
@@ -3,7 +3,7 @@ set -o errexit
 set -o nounset
 set -o pipefail
 
-if [[ $GERRIT_EVENT_TYPE = "change-merged" ]]; then
+if [[ "$JOB_NAME" =~ "merge" ]]; 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
index a4bf32c..2783f2c 100755 (executable)
@@ -14,9 +14,9 @@ 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
-if [[ ! $GERRIT_EVENT_TYPE = "change-merged" ]]; then
+if [[ "$JOB_NAME" =~ "daily" ]]; then
     gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
-else
+elif [[ "$JOB_NAME" =~ "merge" ]]; then
     echo "Uploaded Fuel ISO for a merged change"
 fi
 
index 1625124..e809592 100644 (file)
@@ -11,7 +11,6 @@
 
     jobs:
         - 'fuel-verify-build-{stream}'
-        - 'fuel-verify-virtual-deploy-{stream}'
         - 'fuel-merge-build-{stream}'
         - 'fuel-merge-virtual-deploy-{stream}'
         - 'fuel-daily-{stream}'
     builders:
         - shell:
             !include-raw ./fuel-build.sh
-#        - shell:
-#            !include-raw ./fuel-upload-artifact.sh
-#        - shell:
-#            !include-raw ./fuel-workspace-cleanup.sh
-
-- job-template:
-    name: 'fuel-verify-virtual-deploy-{stream}'
-
-    project-type: freestyle
-
-    node: ericsson-build
-
-    concurrent: true
-
-    properties:
-        - throttle:
-            enabled: true
-            max-total: 2
-            max-per-node: 1
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
-
-    parameters:
-        - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: '{branch}'
-        - fuel-parameter:
-            installer: '{installer}'
-            gs-pathname: '{gs-pathname}'
-
-    scm:
-        - gerrit-trigger-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: '$GERRIT_REFSPEC'
-            choosing-strategy: 'gerrit'
-
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
-
-    triggers:
-        - gerrit:
-            trigger-on:
-                - patchset-created-event:
-                    exclude-drafts: 'false'
-                    exclude-trivial-rebase: 'false'
-                    exclude-no-code-change: 'false'
-                - draft-published-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'recheck'
-                - comment-added-contains-event:
-                    comment-contains-value: 'reverify'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: '{project}'
-                branches:
-                  - branch-compare-type: 'ANT'
-                    branch-pattern: '**/{branch}'
-            dependency-jobs: 'fuel-verify-build-{stream}'
-
-    builders:
-#        - shell:
-#            !include-raw ./fuel-download-artifact.sh
         - shell:
-            !include-raw ./fuel-virtual-deploy.sh
-#        - shell:
-#            !include-raw ./fuel-workspace-cleanup.sh
+            !include-raw ./fuel-workspace-cleanup.sh
 
 - job-template:
     name: 'fuel-merge-build-{stream}'