diff options
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/compass4nfv/compass4nfv.yml | 107 |
1 files changed, 25 insertions, 82 deletions
diff --git a/jjb/compass4nfv/compass4nfv.yml b/jjb/compass4nfv/compass4nfv.yml index e56c26292..b53dc841b 100644 --- a/jjb/compass4nfv/compass4nfv.yml +++ b/jjb/compass4nfv/compass4nfv.yml @@ -8,7 +8,6 @@ jobs: - 'compass-verify' - 'compass-verify-on-ericsson-node' - - 'compass-upload-iso' - 'compass-merge' - 'compass-daily-{stream}' - 'compass-build' @@ -36,33 +35,6 @@ # job templates ######################## - job-template: - name: 'compass-upload-iso' - project-type: freestyle - disabled: false - - node: master - - logrotate: - daysToKeep: 30 - numToKeep: 10 - artifactDaysToKeep: -1 - artifactNumToKeep: -1 - - parameters: - - project-parameter: - project: '{project}' - - compass-parameter: - installer: '{installer}' - - wrappers: - - ssh-agent-credentials: - user: '{ssh-credentials}' - - builders: - - 'compass-copy-artifact-from-upstream-build' - - 'compass-upload-artifact' - -- job-template: name: 'compass-verify-on-ericsson-node' project-type: freestyle @@ -200,6 +172,7 @@ branch: 'master' - compass-parameter: installer: '{installer}' + scm: - gerrit-trigger-scm: credentials-id: '{ssh-credentials}' @@ -274,7 +247,7 @@ project-type: freestyle - node: huawei-build + node: ericsson-build logrotate: daysToKeep: 30 @@ -296,16 +269,7 @@ builders: - 'compass-build' - - 'compass-workspace-cleanup' - - publishers: - - archive: - artifacts: '$BUILD_DIRECTORY/*.*' - allow-empty: 'true' - fingerprint: true - - trigger: - project: 'compass-upload-iso' - threshold: SUCCESS + - 'compass-upload-artifact' - job-template: name: 'compass-deploy-virtual-{flavor}' @@ -337,7 +301,7 @@ builders: - 'compass-ci-preclean-workspace' - - 'compass-download-artifact-from-internal-repo' + - 'compass-download-artifact' - 'compass-deploy-virtual-flavor' ######################## @@ -352,11 +316,11 @@ description: "Installer to use." - string: name: BUILD_DIRECTORY - default: build_output + default: $WORKSPACE/build_output description: "Directory where the build artifact will be located upon the completion of the build." - string: name: CACHE_DIRECTORY - default: $HOME/opnfv/cache/ + default: $HOME/opnfv/cache/$PROJECT description: "Directory where the cache to be used during the build is located." - string: name: GIT_BASE @@ -364,33 +328,22 @@ description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW." - string: name: GS_URL - default: artifacts.opnfv.org/$PROJECT/$INSTALLER + default: artifacts.opnfv.org/$PROJECT/ description: "URL to Google Storage." - string: + name: GS_URL_PROXY + default: build.opnfv.org/artifacts/$PROJECT/ + description: "URL to Google Storage proxy" + - string: name: INTERNAL_REPO_XA default: "root@192.168.127.11:~/xh/work/build/work" description: "Artifact Repository" - - string: - name: ISO_DIRECTORY - default: "http://192.168.127.11:9999/" + ######################## # builder macros ######################## - builder: - name: compass-copy-artifact-from-upstream-build - builders: - - copyartifact: - project: "compass-build" - filter: "$BUILD_DIRECTORY/compass.iso, $BUILD_DIRECTORY/opnfv.properties" - target: ./ - which-build: upstream-build - optional: true - flatten: true - parameter-filters: PUBLISH=true - - -- builder: name: compass-merge builders: - shell: | @@ -415,17 +368,17 @@ # create the cache directory if it doesn't exist [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY + [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY # set OPNFV_ARTIFACT_VERSION export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") # start the build cd $WORKSPACE/ - mkdir $WORKSPACE/$BUILD_DIRECTORY - ./build.sh --iso-dir $WORKSPACE/$BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY + ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY # list the build artifacts - ls -al $WORKSPACE/$BUILD_DIRECTORY + ls -al $BUILD_DIRECTORY # save information regarding artifact into file ( @@ -433,14 +386,14 @@ echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)" echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)" echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" - echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $WORKSPACE/$BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)" + echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)" echo "OPNFV_BUILD_URL=$BUILD_URL" - ) > $WORKSPACE/$BUILD_DIRECTORY/opnfv.properties + ) > $BUILD_DIRECTORY/opnfv.properties echo echo "--------------------------------------------------------" echo "Done!" - sudo rm -rf $WORKSPACE/work/ + sudo rm -rf $WORKSPACE/work - builder: name: 'compass-deploy-virtual-flavor' @@ -456,20 +409,13 @@ echo "--------------------------------------------------------" echo - export ISO_URL=$WORKSPACE/$BUILD_DIRECTORY/compass.iso + export ISO_URL=file://$BUILD_DIRECTORY/compass.iso cd $WORKSPACE ./deploy.sh $FLAVOR_CONF echo echo "--------------------------------------------------------" echo "Done!" -- builder: - name: 'compass-download-artifact-from-internal-repo' - builders: - - shell: | - #!/bin/bash - echo "download iso from internal repo" - curl -s -o $WORKSPACE/$BUILD_DIRECTORY/compass.iso $ISO_DIRECTORY/compass.iso > download.iso.log 2>&1 - builder: name: 'compass-upload-artifact' @@ -486,16 +432,13 @@ echo # source the opnfv.properties to get ARTIFACT_VERSION - source $WORKSPACE/$BUILD_DIRECTORY/opnfv.properties - - scp $WORKSPACE/$BUILD_DIRECTORY/compass.iso $INTERNAL_REPO_XA/ - scp $WORKSPACE/$BUILD_DIRECTORY/opnfv.properties $INTERNAL_REPO_XA/ - scp $WORKSPACE/$BUILD_DIRECTORY/compass.iso $INTERNAL_REPO_XA/opnfv-$OPNFV_ARTIFACT_VERSION.iso + source $BUILD_DIRECTORY/opnfv.properties # upload artifact and additional files to google storage - gsutil cp $WORKSPACE/$BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 - gsutil cp $WORKSPACE/$BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 - gsutil cp $WORKSPACE/$BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 + gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1 + gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1 + gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1 + echo echo "--------------------------------------------------------" @@ -503,7 +446,7 @@ echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" - builder: - name: 'compass-download-artifact-from-opnfv-repo' + name: 'compass-download-artifact' builders: - shell: | #!/bin/bash |