diff options
Diffstat (limited to 'jjb/fuel')
-rwxr-xr-x | jjb/fuel/fuel-build.sh | 7 | ||||
-rwxr-xr-x | jjb/fuel/fuel-deploy.sh | 5 | ||||
-rwxr-xr-x | jjb/fuel/fuel-download-artifact.sh | 9 | ||||
-rwxr-xr-x | jjb/fuel/fuel-upload-artifact.sh | 6 | ||||
-rw-r--r-- | jjb/fuel/fuel.yml | 89 |
5 files changed, 30 insertions, 86 deletions
diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh index 178a50c68..cffd8673b 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 [[ "$JOB_NAME" =~ "merge" ]]; then + echo "Building Fuel ISO for a merged change" + export OPNFV_ARTIFACT_VERSION="gerrit-$GERRIT_CHANGE_NUMBER" +else + export 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-deploy.sh b/jjb/fuel/fuel-deploy.sh index bb0e2b15f..2ec519597 100755 --- a/jjb/fuel/fuel-deploy.sh +++ b/jjb/fuel/fuel-deploy.sh @@ -18,8 +18,8 @@ chmod a+x $HOME chmod a+x $TMPDIR # set CONFDIR, BRIDGE -export CONFDIR=$WORKSPACE/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2 -export BRIDGE=pxebr +CONFDIR=$WORKSPACE/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2 +BRIDGE=pxebr # clone genesis repo and checkout the SR1 tag echo "Cloning genesis repo" @@ -42,6 +42,7 @@ echo # start the deployment echo "Issuing command" echo "sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh" + sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh echo diff --git a/jjb/fuel/fuel-download-artifact.sh b/jjb/fuel/fuel-download-artifact.sh index 6eb1ba463..05dc05e05 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 [[ "$JOB_NAME" =~ "merge" ]]; then + # 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 + 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..2783f2cd0 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 [[ "$JOB_NAME" =~ "daily" ]]; then + 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 echo echo "--------------------------------------------------------" diff --git a/jjb/fuel/fuel.yml b/jjb/fuel/fuel.yml index 1f53454e3..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}' @@ -222,10 +151,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 +210,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}' |