summaryrefslogtreecommitdiffstats
path: root/jjb/apex
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/apex')
-rwxr-xr-xjjb/apex/apex-iso-verify.sh2
-rwxr-xr-xjjb/apex/apex-upload-artifact.sh21
-rw-r--r--jjb/apex/apex.yml78
3 files changed, 76 insertions, 25 deletions
diff --git a/jjb/apex/apex-iso-verify.sh b/jjb/apex/apex-iso-verify.sh
index d80de354a..900a3eb2c 100755
--- a/jjb/apex/apex-iso-verify.sh
+++ b/jjb/apex/apex-iso-verify.sh
@@ -8,6 +8,8 @@ echo "Starting the Apex iso verify."
echo "--------------------------------------------------------"
echo
+source $BUILD_DIRECTORY/../opnfv.properties
+
if ! rpm -q virt-install > /dev/null; then
sudo yum -y install virt-install
fi
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 3241af826..56eac78e6 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)
@@ -443,16 +444,63 @@
git-revision: false
same-node: true
block: true
- - 'apex-upload-rpm-artifact'
+ - inject:
+ properties-content: ARTIFACT_TYPE=rpm
+ - 'apex-upload-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'
+ - inject:
+ properties-content: ARTIFACT_TYPE=iso
+ - 'apex-upload-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}'
@@ -1022,7 +1070,9 @@
same-node: true
- shell:
!include-raw-escape: ./apex-snapshot-create.sh
- - 'apex-upload-snapshot-artifact'
+ - inject:
+ properties-content: ARTIFACT_TYPE=snapshot
+ - 'apex-upload-artifact'
# FDIO promote
- job-template:
@@ -1070,7 +1120,9 @@
same-node: true
- shell:
!include-raw-escape: ./apex-snapshot-create.sh
- - 'apex-upload-snapshot-artifact'
+ - inject:
+ properties-content: ARTIFACT_TYPE=snapshot
+ - 'apex-upload-artifact'
- job-template:
name: 'apex-gs-clean-{stream}'
@@ -1159,20 +1211,12 @@
- shell:
!include-raw: ./apex-iso-verify.sh
-- builder:
- name: 'apex-upload-snapshot-artifact'
- builders:
- - shell: ./apex-upload-artifact.sh snapshot
-
-- builder:
- name: 'apex-upload-iso-artifact'
- builders:
- - shell: ./apex-upload-artifact.sh iso
- builder:
- name: 'apex-upload-rpm-artifact'
+ name: 'apex-upload-artifact'
builders:
- - shell: ./apex-upload-artifact.sh rpm
+ - shell:
+ !include-raw: ./apex-upload-artifact.sh
- builder:
name: 'apex-gs-cleanup'