diff options
author | Tim Rozet <trozet@redhat.com> | 2015-10-27 15:18:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-10-27 15:18:18 +0000 |
commit | 6749531694e65ce2f88a10e4b78801d02fcf05be (patch) | |
tree | 8cfdd1b0f8ffe28ba20886f9a9927e61e11a748b /jjb | |
parent | 8f8881e609c8ce7481afc743e8cd8943d772014d (diff) | |
parent | dcac2309e05111c91c5a59aed5bb35628bc3a350 (diff) |
Merge "adding the apex virtual deploy job"
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/apex/apex.yml | 48 |
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 |