From dcac2309e05111c91c5a59aed5bb35628bc3a350 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Thu, 22 Oct 2015 15:57:03 -0400 Subject: adding the apex virtual deploy job Change-Id: I8e547ed70e486006e3db07768572de577e0daa12 Signed-off-by: Dan Radez --- jjb/apex/apex.yml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) 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 -- cgit 1.2.3-korg