From 2b2272a3e908de9beb1ee72580c9419ab6205640 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Fri, 20 Nov 2015 14:28:03 +0100 Subject: Check job name to decide what to do with fuel artifacts fuel-verify-virtual-deploy-master job is also removed for the timebeing. Change-Id: I744830cf377791ad0edf3f8c38012b01b6cd80cd Signed-off-by: Fatih Degirmenci --- jjb/fuel/fuel-build.sh | 2 +- jjb/fuel/fuel-download-artifact.sh | 2 +- jjb/fuel/fuel-upload-artifact.sh | 4 +-- jjb/fuel/fuel.yml | 73 +------------------------------------- 4 files changed, 5 insertions(+), 76 deletions(-) (limited to 'jjb') diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh index 63a62f497..7b1d8510e 100755 --- a/jjb/fuel/fuel-build.sh +++ b/jjb/fuel/fuel-build.sh @@ -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 diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh index 7ebc0d6d0..9adb546aa 100755 --- a/jjb/fuel/fuel-download-artifact.sh +++ b/jjb/fuel/fuel-download-artifact.sh @@ -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 diff --git a/jjb/fuel/fuel-upload-artifact.sh b/jjb/fuel/fuel-upload-artifact.sh index a4bf32cf4..2783f2cd0 100755 --- a/jjb/fuel/fuel-upload-artifact.sh +++ b/jjb/fuel/fuel-upload-artifact.sh @@ -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 diff --git a/jjb/fuel/fuel.yml b/jjb/fuel/fuel.yml index 1625124f6..e809592fc 100644 --- a/jjb/fuel/fuel.yml +++ b/jjb/fuel/fuel.yml @@ -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}' @@ -92,78 +91,8 @@ 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}' -- cgit 1.2.3-korg