4 - 'apex-verify-{stream1}'
5 - 'apex-verify-{stream2}'
6 - 'apex-runner-{platform}-{scenario}-{stream}'
7 - 'apex-build-{stream}'
8 - 'apex-deploy-virtual-{scenario}-{stream}'
9 - 'apex-deploy-baremetal-{scenario}-{stream}'
10 - 'apex-daily-{stream1}'
11 - 'apex-daily-{stream2}'
13 # stream: branch with - in place of / (eg. stable-arno)
14 # branch: branch (eg. stable/arno)
19 block-stream: 'brahmaputra'
22 branch: 'stable/brahmaputra'
23 gs-pathname: '/brahmaputra'
24 block-stream: 'master'
32 block-stream: 'brahmaputra'
37 branch: 'stable/brahmaputra'
38 gs-pathname: '/brahmaputra'
39 block-stream: 'master'
46 - 'os-nosdn-nofeature-ha'
47 - 'os-odl_l2-nofeature-ha'
48 - 'os-odl_l2-bgpvpn-ha'
49 - 'os-odl_l2-sfc-noha'
50 - 'os-odl_l3-nofeature-ha'
51 - 'os-onos-nofeature-ha'
52 - 'os-opencontrail-nofeature-ha'
60 name: 'apex-verify-{stream2}'
66 gs-pathname: '{gs-pathname}'
73 default: https://gerrit.opnfv.org/gerrit/$PROJECT
74 description: "Used for overriding the GIT URL coming from parameters macro."
78 credentials-id: '{ssh-credentials}'
79 refspec: '$GERRIT_REFSPEC'
80 choosing-strategy: 'gerrit'
85 - patchset-created-event:
86 exclude-drafts: 'false'
87 exclude-trivial-rebase: 'false'
88 exclude-no-code-change: 'true'
89 - draft-published-event
90 - comment-added-contains-event:
91 comment-contains-value: 'recheck'
92 - comment-added-contains-event:
93 comment-contains-value: 'reverify'
95 - project-compare-type: 'ANT'
96 project-pattern: 'apex'
98 - branch-compare-type: 'ANT'
99 branch-pattern: '**/{branch}'
112 use-build-blocker: true
114 - 'apex-daily.*{stream2}'
115 - 'apex-deploy.*{stream2}'
116 - 'apex-build.*{stream2}'
117 - 'apex-runner.*{stream2}'
118 - 'apex-verify-{stream2}'
123 - project: 'apex-deploy-virtual-os-odl_l2-nofeature-ha-{stream2}'
124 predefined-parameters: |
125 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
130 - project: 'apex-deploy-virtual-os-onos-nofeature-ha-{stream2}'
131 predefined-parameters: |
132 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
137 - project: 'apex-deploy-virtual-os-odl_l3-nofeature-ha-{stream2}'
138 predefined-parameters: |
139 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
144 - project: 'apex-deploy-virtual-os-odl_l2-sfc-noha-{stream2}'
145 predefined-parameters: |
146 BUILD_DIRECTORY=apex-verify-{stream2}/build_output
150 - 'apex-workspace-cleanup'
154 name: 'apex-verify-{stream1}'
160 gs-pathname: '{gs-pathname}'
167 default: https://gerrit.opnfv.org/gerrit/$PROJECT
168 description: "Used for overriding the GIT URL coming from parameters macro."
171 - gerrit-trigger-scm:
172 credentials-id: '{ssh-credentials}'
173 refspec: '$GERRIT_REFSPEC'
174 choosing-strategy: 'gerrit'
179 - patchset-created-event:
180 exclude-drafts: 'false'
181 exclude-trivial-rebase: 'false'
182 exclude-no-code-change: 'true'
183 - draft-published-event
184 - comment-added-contains-event:
185 comment-contains-value: 'recheck'
186 - comment-added-contains-event:
187 comment-contains-value: 'reverify'
189 - project-compare-type: 'ANT'
190 project-pattern: 'apex'
192 - branch-compare-type: 'ANT'
193 branch-pattern: '**/{branch}'
206 use-build-blocker: true
208 - 'apex-daily.*{stream1}'
209 - 'apex-deploy.*{stream1}'
210 - 'apex-build.*{stream1}'
211 - 'apex-runner.*{stream1}'
212 - 'apex-verify-{stream1}'
217 - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream1}'
218 predefined-parameters: |
219 BUILD_DIRECTORY=apex-verify-{stream1}/build_output
224 - project: 'functest-apex-{slave}-suite-{stream1}'
225 predefined-parameters: |
226 DEPLOY_SCENARIO=os-nosdn-nofeature-ha
227 FUNCTEST_SUITE_NAME=vping_userdata
229 - 'apex-workspace-cleanup'
232 name: 'apex-runner-{platform}-{scenario}-{stream}'
234 # runner jobs for deploying manually
242 gs-pathname: '{gs-pathname}'
249 default: https://gerrit.opnfv.org/gerrit/$PROJECT
250 description: "Used for overriding the GIT URL coming from parameters macro."
253 - gerrit-trigger-scm:
254 credentials-id: '{ssh-credentials}'
256 choosing-strategy: 'default'
260 use-build-blocker: true
262 - 'apex-daily.*{stream}'
263 - 'apex-verify.*{stream}'
267 - project: 'apex-deploy-{platform}-{scenario}-{stream}'
268 predefined-parameters:
273 - project: 'yardstick-apex-{slave}-daily-{stream}'
274 predefined-parameters:
275 DEPLOY_SCENARIO={scenario}
278 build-step-failure-threshold: 'never'
279 failure-threshold: 'never'
280 unstable-threshold: 'FAILURE'
282 - project: 'functest-apex-{slave}-daily-{stream}'
283 predefined-parameters:
284 DEPLOY_SCENARIO={scenario}
287 build-step-failure-threshold: 'never'
288 failure-threshold: 'never'
289 unstable-threshold: 'FAILURE'
292 name: 'apex-build-{stream}'
294 # Job template for builds
296 # Required Variables:
297 # stream: branch with - in place of / (eg. stable)
298 # branch: branch (eg. stable)
307 gs-pathname: '{gs-pathname}'
312 default: https://gerrit.opnfv.org/gerrit/$PROJECT
313 description: "Used for overriding the GIT URL coming from parameters macro."
317 credentials-id: '{ssh-credentials}'
323 use-build-blocker: true
325 - 'apex-deploy.*{stream}'
330 - project: 'apex-deploy-virtual-os-nosdn-nofeature-ha-{stream}'
331 predefined-parameters: |
332 BUILD_DIRECTORY=apex-build-{stream}/build_output
336 - 'apex-upload-artifact'
339 name: 'apex-deploy-virtual-{scenario}-{stream}'
341 # Job template for virtual deployment
343 # Required Variables:
344 # stream: branch with - in place of / (eg. stable)
345 # branch: branch (eg. stable)
352 credentials-id: '{ssh-credentials}'
360 gs-pathname: '{gs-pathname}'
362 name: DEPLOY_SCENARIO
363 default: '{scenario}'
364 description: "Scenario to deploy with."
368 description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
372 use-build-blocker: true
374 - 'apex-deploy.*{stream}'
377 - 'apex-deploy-virtual'
378 - 'apex-workspace-cleanup'
381 name: 'apex-deploy-baremetal-{scenario}-{stream}'
383 # Job template for baremetal deployment
385 # Required Variables:
386 # stream: branch with - in place of / (eg. stable)
387 # branch: branch (eg. stable)
394 credentials-id: '{ssh-credentials}'
402 gs-pathname: '{gs-pathname}'
404 name: DEPLOY_SCENARIO
405 default: '{scenario}'
406 description: "Scenario to deploy with."
410 use-build-blocker: true
412 - 'apex-verify.*{stream}'
413 - 'apex-deploy.*{stream}'
414 - 'apex-build.*{stream}'
418 - 'apex-deploy-baremetal'
419 - 'apex-workspace-cleanup'
423 name: 'apex-daily-{stream2}'
425 # Job template for daily build
427 # Required Variables:
428 # stream: branch with - in place of / (eg. stable)
429 # branch: branch (eg. stable)
436 credentials-id: '{ssh-credentials}'
444 gs-pathname: '{gs-pathname}'
448 use-build-blocker: true
450 - 'apex-verify.*{stream2}'
451 - 'apex-deploy.*{stream2}'
452 - 'apex-build.*{stream2}'
453 - 'apex-runner.*{stream2}'
460 - project: 'apex-build-{stream2}'
462 current-parameters: true
465 - project: 'apex-deploy-baremetal-os-odl_l2-nofeature-ha-{stream2}'
466 predefined-parameters: |
467 BUILD_DIRECTORY=apex-build-{stream2}/build_output
472 - project: 'functest-apex-{slave}-daily-{stream2}'
473 predefined-parameters:
474 DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
477 build-step-failure-threshold: 'never'
478 failure-threshold: 'never'
479 unstable-threshold: 'FAILURE'
481 - project: 'yardstick-apex-{slave}-daily-{stream2}'
482 predefined-parameters:
483 DEPLOY_SCENARIO=os-odl_l2-nofeature-ha
486 build-step-failure-threshold: 'never'
487 failure-threshold: 'never'
488 unstable-threshold: 'FAILURE'
490 - project: 'apex-deploy-baremetal-os-onos-nofeature-ha-{stream2}'
491 predefined-parameters:
492 BUILD_DIRECTORY=apex-build-{stream2}/build_output
496 - project: 'functest-apex-{slave}-daily-{stream2}'
497 predefined-parameters:
498 DEPLOY_SCENARIO=os-onos-nofeature-ha
501 build-step-failure-threshold: 'never'
502 failure-threshold: 'never'
503 unstable-threshold: 'FAILURE'
505 - project: 'yardstick-apex-{slave}-daily-{stream2}'
506 predefined-parameters:
507 DEPLOY_SCENARIO=os-onos-nofeature-ha
510 build-step-failure-threshold: 'never'
511 failure-threshold: 'never'
512 unstable-threshold: 'FAILURE'
514 - project: 'apex-deploy-baremetal-os-odl_l3-nofeature-ha-{stream2}'
515 predefined-parameters:
516 BUILD_DIRECTORY=apex-build-{stream2}/build_output
520 - project: 'functest-apex-{slave}-daily-{stream2}'
521 predefined-parameters:
522 DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
525 build-step-failure-threshold: 'never'
526 failure-threshold: 'never'
527 unstable-threshold: 'FAILURE'
529 - project: 'yardstick-apex-{slave}-daily-{stream2}'
530 predefined-parameters:
531 DEPLOY_SCENARIO=os-odl_l3-nofeature-ha
534 build-step-failure-threshold: 'never'
535 failure-threshold: 'never'
536 unstable-threshold: 'FAILURE'
538 - project: 'apex-deploy-baremetal-os-odl_l2-bgpvpn-ha-{stream2}'
539 predefined-parameters:
540 BUILD_DIRECTORY=apex-build-{stream2}/build_output
544 - project: 'functest-apex-{slave}-daily-{stream2}'
545 predefined-parameters:
546 DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha
549 build-step-failure-threshold: 'never'
550 failure-threshold: 'never'
551 unstable-threshold: 'FAILURE'
553 - project: 'yardstick-apex-{slave}-daily-{stream2}'
554 predefined-parameters:
555 DEPLOY_SCENARIO=os-odl_l2-bgpvpn-ha
558 build-step-failure-threshold: 'never'
559 failure-threshold: 'never'
560 unstable-threshold: 'FAILURE'
564 name: 'apex-daily-{stream1}'
566 # Job template for daily build
568 # Required Variables:
569 # stream: branch with - in place of / (eg. stable)
570 # branch: branch (eg. stable)
577 credentials-id: '{ssh-credentials}'
585 gs-pathname: '{gs-pathname}'
589 use-build-blocker: true
591 - 'apex-verify.*{stream1}'
592 - 'apex-deploy.*{stream1}'
593 - 'apex-build.*{stream1}'
594 - 'apex-runner.*{stream1}'
601 - project: 'apex-build-{stream1}'
603 current-parameters: true
606 - project: 'apex-deploy-virtual-nosdn-nofeature-ha-{stream1}'
607 predefined-parameters: |
608 BUILD_DIRECTORY=apex-build-{stream1}/build_output
613 - project: 'functest-apex-{slave}-daily-{stream1}'
614 predefined-parameters:
615 DEPLOY_SCENARIO=os-nosdn-nofeature-ha
618 build-step-failure-threshold: 'never'
619 failure-threshold: 'never'
620 unstable-threshold: 'FAILURE'
622 - project: 'yardstick-apex-{slave}-daily-{stream1}'
623 predefined-parameters:
624 DEPLOY_SCENARIO=os-nosdn-nofeature-ha
627 build-step-failure-threshold: 'never'
628 failure-threshold: 'never'
629 unstable-threshold: 'FAILURE'
631 ########################
633 ########################
640 description: "RPM Artifact name that will be appended to GS_URL to deploy a specific artifact"
642 name: ARTIFACT_VERSION
644 description: "Artifact version type"
646 name: BUILD_DIRECTORY
647 default: $WORKSPACE/build_output
648 description: "Directory where the build artifact will be located upon the completion of the build."
650 name: CACHE_DIRECTORY
651 default: $HOME/opnfv/cache{gs-pathname}
652 description: "Directory where the cache to be used during the build is located."
655 default: https://gerrit.opnfv.org/gerrit/$PROJECT
656 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
659 default: artifacts.opnfv.org/$PROJECT{gs-pathname}
660 description: "URL to Google Storage."
662 ########################
664 ########################
673 # log info to console
674 echo "Starting the build of Apex using OpenStack Master packages. This will take some time..."
675 echo "---------------------------------------------------------------------------------------"
677 # create the cache directory if it doesn't exist
678 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
679 # set OPNFV_ARTIFACT_VERSION
680 if echo $BUILD_TAG | grep "apex-verify" 1> /dev/null; then
681 if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
682 export OPNFV_ARTIFACT_VERSION=brahmaputra-dev${BUILD_NUMBER}
683 export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
685 export OPNFV_ARTIFACT_VERSION=dev${BUILD_NUMBER}
686 export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY"
688 elif [ "$ARTIFACT_VERSION" == "daily" ]; then
689 if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
690 export OPNFV_ARTIFACT_VERSION=brahmaputra-$(date -u +"%Y-%m-%d")
691 export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
693 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d")
694 export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY --iso"
697 export OPNFV_ARTIFACT_VERSION=${ARTIFACT_VERSION}
698 if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
699 export BUILD_ARGS="-v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY"
701 export BUILD_ARGS="-r $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY --iso"
704 # clean for stable but doesn't matter for master
705 if echo $GERRIT_BRANCH | grep "brahmaputra" 1> /dev/null; then
710 ./build.sh $BUILD_ARGS
711 RPM_VERSION=$(grep Version $BUILD_DIRECTORY/../build/opnfv-apex.spec | awk '{ print $2 }')-$(echo $OPNFV_ARTIFACT_VERSION | tr -d '_-')
712 # list the contents of BUILD_OUTPUT directory
713 ls -al $BUILD_DIRECTORY
714 # save information regarding artifact into file
716 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
717 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
718 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
719 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
720 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
721 echo "OPNFV_SRPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.src.rpm"
722 echo "OPNFV_RPM_URL=$GS_URL/opnfv-apex-$RPM_VERSION.noarch.rpm"
723 echo "OPNFV_RPM_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-apex-$RPM_VERSION.noarch.rpm | cut -d' ' -f1)"
724 echo "OPNFV_BUILD_URL=$BUILD_URL"
725 ) > $WORKSPACE/opnfv.properties
726 echo "--------------------------------------------------------"
730 name: 'apex-workspace-cleanup'
738 # delete everything that is in $WORKSPACE
739 /bin/rm -rf $WORKSPACE
742 name: 'apex-upload-artifact'
750 # log info to console
751 echo "Uploading the Apex artifact. This could take some time..."
752 echo "--------------------------------------------------------"
755 # source the opnfv.properties to get ARTIFACT_VERSION
756 source $WORKSPACE/opnfv.properties
758 # upload artifact and additional files to google storage
759 gsutil cp $BUILD_DIRECTORY/OPNFV-CentOS-7-x86_64-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
760 RPM_INSTALL_PATH=$BUILD_DIRECTORY/$(basename $OPNFV_RPM_URL)
761 RPM_LIST=$RPM_INSTALL_PATH
762 for pkg in common undercloud opendaylight-sfc; do
763 RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
765 SRPM_INSTALL_PATH=$BUILD_DIRECTORY/$(basename $OPNFV_SRPM_URL)
766 SRPM_LIST=$SRPM_INSTALL_PATH
767 for pkg in common undercloud opendaylight-sfc; do
768 SRPM_LIST+=" ${SRPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
770 for artifact in $RPM_LIST $SRPM_LIST; do
771 gsutil cp $artifact gs://$GS_URL/$(basename $artifact) > gsutil.iso.log 2>&1
773 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
774 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
777 echo "--------------------------------------------------------"
779 echo "ISO Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
780 echo "RPM Artifact is available as http://$GS_URL/$(basename $OPNFV_RPM_URL)"
783 name: 'apex-deploy-virtual'
791 # log info to console
792 echo "Starting the Apex virtual deployment."
793 echo "--------------------------------------------------------"
796 if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
797 cd $WORKSPACE/../${BUILD_DIRECTORY/build_output/}
799 echo "WORKSPACE modified to $WORKSPACE"
801 elif [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
802 # if artifact name is passed the pull a
803 # specific artifact from artifacts.opnfv.org
804 RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME
806 if [[ $BUILD_DIRECTORY == *verify* ]]; then
807 BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
808 echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
809 elif [[ $BUILD_DIRECTORY == *apex-build* ]]; then
810 BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
811 echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
814 if [[ -f ${BUILD_DIRECTORY}/../opnfv.properties ]]; then
815 # if opnfv.properties exists then use the
816 # local build. Source the file so we get local OPNFV vars
817 source ${BUILD_DIRECTORY}/../opnfv.properties
818 RPM_INSTALL_PATH=${BUILD_DIRECTORY}/$(basename $OPNFV_RPM_URL)
820 if [[ $BUILD_DIRECTORY == *verify* ]]; then
821 echo "BUILD_DIRECTORY is from a verify job, so will not use latest from URL"
822 echo "Check that the slave has opnfv.properties in $BUILD_DIRECTORY"
824 elif [[ $BUILD_DIRECTORY == *apex-build* ]]; then
825 echo "BUILD_DIRECTORY is from a daily job, so will not use latest from URL"
826 echo "Check that the slave has opnfv.properties in $BUILD_DIRECTORY"
829 # no opnfv.properties means use the latest from artifacts.opnfv.org
830 # get the latest.properties to get the link to the latest artifact
831 curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties
832 [[ -f opnfv.properties ]] || exit 1
833 # source the file so we get OPNFV vars
834 source opnfv.properties
835 RPM_INSTALL_PATH=$OPNFV_RPM_URL
839 if [ -z "$DEPLOY_SCENARIO" ]; then
840 echo "Deploy scenario not set!"
844 # use local build for verify
845 if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
846 if [ ! -e "${WORKSPACE}/build/lib" ]; then ln -s ${WORKSPACE}/lib ${WORKSPACE}/build/lib; fi
847 DEPLOY_CMD="./deploy.sh -c ${WORKSPACE}/build -r ${WORKSPACE}/build/images/"
848 DEPLOY_FILE="${WORKSPACE}/config/deploy/${DEPLOY_SCENARIO}.yaml"
849 NETWORK_FILE="${WORKSPACE}/config/network/network_settings.yaml"
850 # Make sure python34 is installed
851 if ! rpm -q python34 > /dev/null; then
852 sudo yum install -y epel-release
853 if ! sudo yum install -y python34; then
854 echo "Failed to install python34"
858 if [ -z ${PYTHONPATH:-} ]; then
859 export PYTHONPATH=${WORKSPACE}/lib/python
861 export PYTHONPATH=$PYTHONPATH:${WORKSPACE}/lib/python
864 RPM_LIST=$RPM_INSTALL_PATH
865 for pkg in common undercloud opendaylight-sfc; do
866 RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
869 # update / install the new rpm
870 if rpm -q opnfv-apex > /dev/null; then
871 if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
872 echo "RPM is already installed"
873 elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
874 if ! sudo yum downgrade -y $RPM_LIST; then
875 sudo yum remove -y opnfv-undercloud opnfv-common
876 sudo yum downgrade -y $RPM_INSTALL_PATH
880 sudo yum install -y $RPM_LIST;
882 DEPLOY_CMD=opnfv-deploy
883 DEPLOY_FILE="/etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
884 NETWORK_FILE="/etc/opnfv-apex/network_settings.yaml"
887 if [ "$OPNFV_CLEAN" == 'yes' ]; then
888 if [[ $BUILD_DIRECTORY == *verify-master* ]]; then
894 # initiate virtual deployment
895 echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"
896 if [ -e $DEPLOY_FILE ]; then
897 sudo $DEPLOY_CMD -v -d ${DEPLOY_FILE} -n $NETWORK_FILE --debug
899 echo "File does not exist /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
903 echo "--------------------------------------------------------"
907 name: 'apex-deploy-baremetal'
915 # log info to console
916 echo "Starting the Apex baremetal deployment."
917 echo "--------------------------------------------------------"
920 if [[ ! "$ARTIFACT_NAME" == "latest" ]]; then
921 # if artifact name is passed the pull a
922 # specific artifact from artifacts.opnfv.org
923 RPM_INSTALL_PATH=$GS_URL/$ARTIFACT_NAME
925 if [[ $BUILD_DIRECTORY == *apex-build* ]]; then
926 BUILD_DIRECTORY=$WORKSPACE/../$BUILD_DIRECTORY
927 echo "BUILD DIRECTORY modified to $BUILD_DIRECTORY"
929 if [[ -f ${BUILD_DIRECTORY}/../opnfv.properties ]]; then
930 # if opnfv.properties exists then use the
931 # local build. Source the file so we get local OPNFV vars
932 source ${BUILD_DIRECTORY}/../opnfv.properties
933 RPM_INSTALL_PATH=${BUILD_DIRECTORY}/$(basename $OPNFV_RPM_URL)
935 # no opnfv.properties means use the latest from artifacts.opnfv.org
936 # get the latest.properties to get the link to the latest artifact
937 curl -s -o $WORKSPACE/opnfv.properties http://$GS_URL/latest.properties
938 [[ -f opnfv.properties ]] || exit 1
939 # source the file so we get OPNFV vars
940 source opnfv.properties
941 RPM_INSTALL_PATH=$OPNFV_RPM_URL
945 if [ ! -e "$RPM_INSTALL_PATH" ]; then
946 RPM_INSTALL_PATH=http://${OPNFV_RPM_URL}
949 RPM_LIST=$RPM_INSTALL_PATH
950 for pkg in common undercloud; do
951 RPM_LIST+=" ${RPM_INSTALL_PATH/opnfv-apex/opnfv-apex-${pkg}}"
954 # update / install the new rpm
955 if rpm -q opnfv-apex > /dev/null; then
956 if [ $(basename $OPNFV_RPM_URL) == $(rpm -q opnfv-apex).rpm ]; then
957 echo "RPM is already installed"
958 elif sudo yum update -y $RPM_LIST | grep "does not update installed package"; then
959 if ! sudo yum downgrade -y $RPM_LIST; then
960 sudo yum remove -y opnfv-undercloud opnfv-common
961 sudo yum downgrade -y $RPM_INSTALL_PATH
965 sudo yum install -y $RPM_LIST;
968 # cleanup environment before we start
970 # initiate baremetal deployment
971 if [ -e /etc/opnfv-apex/network_settings.yaml ]; then
972 if [ -n "$DEPLOY_SCENARIO" ]; then
973 echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"
974 if [ -e /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml ]; then
975 sudo opnfv-deploy -i /root/inventory/pod_settings.yaml \
976 -d /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml \
977 -n /root/network/network_settings.yaml --debug
979 echo "File does not exist /etc/opnfv-apex/${DEPLOY_SCENARIO}.yaml"
983 echo "Deploy scenario not set!"
987 echo "File /etc/opnfv-apex/network_settings.yaml does not exist!"
992 echo "--------------------------------------------------------"
995 #######################
997 ########################
1001 - timed: '0 3 * * *'
1003 name: 'apex-brahmaputra'
1005 - timed: '0 3 * * *'