X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fapex%2Fapex.yml;h=f920c9b9bd80391c63bb15e846c28f480925f7b6;hb=1f175b394903621761454afa49e4cd942b9a5948;hp=7a79a374d4a154c26a19cb1ea8cb35833bf205c3;hpb=11277e07287f5e3863257acb03e7fa24bbbf63bb;p=releng.git diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 7a79a374d..f920c9b9b 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -21,8 +21,6 @@ node: opnfv-jump-1 - project-type: freestyle - logrotate: daysToKeep: 30 numToKeep: 10 @@ -48,10 +46,6 @@ refspec: '$GERRIT_REFSPEC' choosing-strategy: 'gerrit' - wrappers: - - ssh-agent-credentials: - user: '{ssh-credentials}' - triggers: - gerrit: trigger-on: @@ -76,6 +70,7 @@ builders: - 'apex-build' + - 'apex-deploy-virtual' - 'apex-workspace-cleanup' - job-template: @@ -87,8 +82,6 @@ node: opnfv-jump-1 - project-type: freestyle - logrotate: daysToKeep: 30 numToKeep: 40 @@ -114,10 +107,6 @@ refspec: '' choosing-strategy: 'default' - wrappers: - - ssh-agent-credentials: - user: '{ssh-credentials}' - triggers: - gerrit: trigger-on: @@ -136,6 +125,7 @@ builders: - 'apex-build' + - 'apex-deploy-virtual' - 'apex-workspace-cleanup' - job-template: @@ -150,8 +140,6 @@ disabled: false - project-type: freestyle - logrotate: daysToKeep: '{build-days-to-keep}' numToKeep: '{build-num-to-keep}' @@ -177,17 +165,21 @@ refspec: '' branch: '{branch}' - wrappers: - - ssh-agent-credentials: - user: '{ssh-credentials}' - triggers: - 'apex-{stream}' builders: - 'apex-build' + - 'apex-deploy-virtual' - 'apex-upload-artifact' - 'apex-workspace-cleanup' + - trigger-builds: + - project: 'functest-apex-{stream}' + block: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' ######################## # parameter macros @@ -300,6 +292,41 @@ 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 + + # source the file so we get OPNFV vars + source opnfv.properties + RPM_INSTALL_PATH=build_output/$(basename $OPNFV_RPM_URL) + + # update / install the new rpm + if rpm -q opnfv-apex > /dev/null; then + if sudo yum update -y $RPM_INSTALL_PATH | grep "does not update installed package"; then + sudo yum downgrade -y $RPM_INSTALL_PATH; + fi + 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