summaryrefslogtreecommitdiffstats
path: root/jjb/apex/apex.yml
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2015-10-22 15:57:03 -0400
committerDan Radez <dradez@redhat.com>2015-10-26 21:03:55 -0400
commitdcac2309e05111c91c5a59aed5bb35628bc3a350 (patch)
treee60fe206fb7c1b8e0cecd2b3aef5475e4b132651 /jjb/apex/apex.yml
parent976b5ae48a545c72c87f9e5dba9deee7e94ada94 (diff)
adding the apex virtual deploy job
Change-Id: I8e547ed70e486006e3db07768572de577e0daa12 Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'jjb/apex/apex.yml')
-rw-r--r--jjb/apex/apex.yml48
1 files changed, 48 insertions, 0 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 7a79a374d..bf6d5e5a0 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -76,6 +76,7 @@
builders:
- 'apex-build'
+ - 'apex-deploy-virtual'
- 'apex-workspace-cleanup'
- job-template:
@@ -136,6 +137,7 @@
builders:
- 'apex-build'
+ - 'apex-deploy-virtual'
- 'apex-workspace-cleanup'
- job-template:
@@ -188,6 +190,8 @@
- 'apex-build'
- 'apex-upload-artifact'
- 'apex-workspace-cleanup'
+ - 'apex-deploy-virtual'
+ - 'apex-workspace-cleanup'
########################
# parameter macros
@@ -300,6 +304,50 @@
echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"
+- builder:
+ name: 'apex-deploy-virtual'
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+
+ # log info to console
+ echo "Starting the Apex virtual deployment."
+ echo "--------------------------------------------------------"
+ echo
+
+ # check if we got the file
+ if [[ -f opnfv.properties ]]; then
+ # source the file so we get OPNFV vars
+ source opnfv.properties
+ RPM_INSTALL_PATH=noarch/$(basepath RPM_URL)
+ else
+ # get the latest.properties file in order to get info regarding latest artifact
+ curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties
+ [[ -f opnfv.properties ]] || exit 1
+
+ # source the file so we get OPNFV vars
+ source opnfv.properties
+ RPM_INSTALL_PATH=$RPM_URL
+ fi
+
+ # update / install the new rpm
+ if rpm -q opnfv-apex; then
+ sudo yum update -y $RPM_INSTALL_PATH;
+ else
+ sudo yum install -y $RPM_INSTALL_PATH;
+ fi
+
+ # cleanup virtual machines before we start
+ sudo opnfv-clean
+ # initiate virtual deployment
+ sudo opnfv-deploy -v
+
+ echo
+ echo "--------------------------------------------------------"
+ echo "Done!"
#######################
# trigger macros