From: Tim Rozet Date: Wed, 19 Apr 2017 17:10:45 +0000 (-0400) Subject: Apex: fixes iso verify X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=76ec9e7ab2d834f3e84d02c9696f393eb8139754;p=releng.git Apex: fixes iso verify Change-Id: I2aeca682d6543b36cd8b28f78580c4194db85453 Signed-off-by: Tim Rozet --- diff --git a/jjb/apex/apex-upload-artifact.sh b/jjb/apex/apex-upload-artifact.sh index 4a2a64d68..e93a46b74 100755 --- a/jjb/apex/apex-upload-artifact.sh +++ b/jjb/apex/apex-upload-artifact.sh @@ -3,8 +3,13 @@ set -o errexit set -o nounset set -o pipefail +if [ -z "$ARTIFACT_TYPE" ]; then + echo "ERROR: ARTIFACT_TYPE not provided...exiting" + exit 1 +fi + # log info to console -echo "Uploading the Apex $1 artifact. This could take some time..." +echo "Uploading the Apex ${ARTIFACT_TYPE} artifact. This could take some time..." echo "--------------------------------------------------------" echo @@ -84,25 +89,25 @@ uploadsnap () { echo "Upload complete for Snapshot" } -if echo $WORKSPACE | grep promote > /dev/null; then +if [ "$ARTIFACT_TYPE" == 'snapshot' ]; then uploadsnap elif gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then echo "Signing Key avaliable" - if [ $1 == 'iso' ]; then + if [ "$ARTIFACT_TYPE" == 'iso' ]; then signiso uploadiso fi - if [ $1 == 'rpm' ]; then + if [ "$ARTIFACT_TYPE" == 'rpm' ]; then signrpm uploadrpm fi else - if [ $1 == 'iso' ]; then uploadiso; fi - if [ $1 == 'rpm' ]; then uploadrpm; fi + if [ "$ARTIFACT_TYPE" == 'iso' ]; then uploadiso; fi + if [ "$ARTIFACT_TYPE" == 'rpm' ]; then uploadrpm; fi fi echo echo "--------------------------------------------------------" echo "Done!" -if [ $1 == 'iso' ]; then echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"; fi -if [ $1 == 'rpm' ]; then echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"; fi +if [ "$ARTIFACT_TYPE" == 'iso' ]; then echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"; fi +if [ "$ARTIFACT_TYPE" == 'rpm' ]; then echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"; fi diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 37bbbb6f1..248f296e1 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -12,6 +12,7 @@ - 'apex-daily-{stream}' - 'apex-csit-promote-daily-{stream}' - 'apex-fdio-promote-daily-{stream}' + - 'apex-verify-iso-{stream}' # stream: branch with - in place of / (eg. stable-arno) # branch: branch (eg. stable/arno) @@ -445,15 +446,58 @@ block: true - 'apex-upload-rpm-artifact' - trigger-builds: - - project: 'apex-iso-verify-{stream}' + - project: 'apex-verify-iso-{stream}' predefined-parameters: | BUILD_DIRECTORY=apex-build-{stream}/.build - OPNFV_CLEAN=yes git-revision: false block: true same-node: true - 'apex-upload-iso-artifact' +# ISO verify job +- job-template: + name: 'apex-verify-iso-{stream}' + + # Job template for builds + # + # Required Variables: + # stream: branch with - in place of / (eg. stable) + # branch: branch (eg. stable) + node: '{daily-slave}' + + disabled: false + + concurrent: true + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - apex-parameter: + gs-pathname: '{gs-pathname}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + + scm: + - git-scm + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-deploy.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - 'apex-iso-verify' + - job-template: name: 'apex-deploy-virtual-{scenario}-{stream}' @@ -1160,19 +1204,28 @@ !include-raw: ./apex-iso-verify.sh - builder: - name: 'apex-upload-snapshot-artifact' + name: 'apex-upload-rpm-artifact' builders: - - shell: ./apex-upload-artifact.sh snapshot + - inject: + properties-content: ARTIFACT_TYPE=rpm + script-content: + !include-raw: ./apex-upload-artifact.sh - builder: name: 'apex-upload-iso-artifact' builders: - - shell: ./apex-upload-artifact.sh iso + - inject: + properties-content: ARTIFACT_TYPE=iso + script-content: + !include-raw: ./apex-upload-artifact.sh - builder: - name: 'apex-upload-rpm-artifact' + name: 'apex-upload-snapshot-artifact' builders: - - shell: ./apex-upload-artifact.sh rpm + - inject: + properties-content: ARTIFACT_TYPE=snapshot + script-content: + !include-raw: ./apex-upload-artifact.sh - builder: name: 'apex-gs-cleanup'