1 ########################
2 # Job configuration for genesis/fuel
3 ########################
13 - 'genesis-fuel-verify-build-{stream}'
14 - 'genesis-fuel-merge-{stream}'
15 - 'genesis-fuel-daily-{stream}'
16 - 'genesis-fuel-build-{stream}'
17 - 'genesis-fuel-deploy-{stream}'
18 - 'genesis-fuel-deploy-runner-{stream}'
19 - 'genesis-fuel-lab-reconfig-{stream}'
20 - 'genesis-fuel-verify-deploy-virtual-{stream}'
22 # stream: branch with - in place of / (eg. stable-arno)
23 # branch: branch (eg. stable/arno)
34 ########################
36 ########################
39 name: 'genesis-fuel-verify-build-{stream}'
53 artifactDaysToKeep: -1
61 - genesis-fuel-parameter:
62 installer: '{installer}'
63 gs-pathname: '{gs-pathname}'
67 credentials-id: '{ssh-credentials}'
68 refspec: '$GERRIT_REFSPEC'
69 choosing-strategy: 'gerrit'
74 - patchset-created-event:
75 exclude-drafts: 'false'
76 exclude-trivial-rebase: 'false'
77 exclude-no-code-change: 'false'
78 - draft-published-event
79 - comment-added-contains-event:
80 comment-contains-value: 'recheck'
81 - comment-added-contains-event:
82 comment-contains-value: 'reverify'
84 - project-compare-type: 'ANT'
85 project-pattern: 'genesis'
87 - branch-compare-type: 'ANT'
88 branch-pattern: '**/{branch}'
91 pattern: 'common/ci/**'
93 pattern: 'common/manifests/**'
95 pattern: 'common/puppet-opnfv/**'
97 pattern: 'common/tools/**'
99 pattern: '{installer}/build/**'
101 pattern: '{installer}/ci/**'
103 pattern: '{installer}/deploy/**'
105 pattern: '{installer}/include/**'
107 pattern: '{installer}/prototypes/**'
108 forbidden-file-paths:
110 pattern: 'common/docs/**'
112 pattern: '{installer}/docs/**'
116 - 'fuel-workspace-cleanup'
119 name: 'genesis-fuel-merge-{stream}'
133 artifactDaysToKeep: -1
141 - genesis-fuel-parameter:
142 installer: '{installer}'
146 - gerrit-trigger-scm:
147 credentials-id: '{ssh-credentials}'
149 choosing-strategy: 'default'
154 - change-merged-event
155 - comment-added-contains-event:
156 comment-contains-value: 'remerge'
158 - project-compare-type: 'ANT'
159 project-pattern: 'genesis'
161 - branch-compare-type: 'ANT'
162 branch-pattern: '**/{branch}'
165 pattern: 'common/ci/**'
167 pattern: 'common/manifests/**'
169 pattern: 'common/puppet-opnfv/**'
171 pattern: 'common/tools/**'
173 pattern: '{installer}/build/**'
175 pattern: '{installer}/ci/**'
177 pattern: '{installer}/deploy/**'
179 pattern: '{installer}/include/**'
181 pattern: '{installer}/prototypes/**'
182 forbidden-file-paths:
184 pattern: 'common/docs/**'
186 pattern: '{installer}/docs/**'
190 - 'fuel-workspace-cleanup'
193 name: 'genesis-fuel-daily-{stream}'
197 disabled: '{obj:disabled}'
200 - 'genesis-fuel-{stream}-trigger'
205 - genesis-fuel-parameter:
206 installer: '{installer}'
207 gs-pathname: '{gs-pathname}'
211 credentials-id: '{ssh-credentials}'
218 artifactDaysToKeep: -1
219 artifactNumToKeep: -1
223 - project: 'genesis-fuel-build-{stream}'
227 - project: 'genesis-fuel-lab-reconfig-{stream}'
231 - project: 'genesis-fuel-deploy-{stream}'
235 - project: 'functest-fuel-{stream}'
238 build-step-failure-threshold: 'never'
239 failure-threshold: 'never'
240 unstable-threshold: 'FAILURE'
242 # - project: 'yardstick-fuel-{stream}'
245 # build-step-failure-threshold: 'never'
246 # failure-threshold: 'never'
247 # unstable-threshold: 'FAILURE'
250 - trigger-parameterized-builds:
251 - project: 'genesis-foreman-daily-{stream}'
252 trigger-with-no-params: true
255 name: 'genesis-fuel-deploy-runner-{stream}'
264 artifactDaysToKeep: -1
265 artifactNumToKeep: -1
270 - genesis-fuel-parameter:
271 installer: '{installer}'
272 gs-pathname: '{gs-pathname}'
275 default: ssh://gerrit.opnfv.org:29418/$PROJECT
276 description: "Used for overriding the GIT URL coming from parameters macro."
280 credentials-id: '{ssh-credentials}'
286 use-build-blocker: true
288 - "genesis-foreman-daily.*"
289 - "genesis-foreman-deploy-runner-{stream}"
290 - "genesis-fuel-daily.*"
293 - 'fuel-lab-reconfig'
295 - project: 'genesis-fuel-deploy-{stream}'
300 name: 'genesis-fuel-build-{stream}'
307 artifactDaysToKeep: -1
308 artifactNumToKeep: -1
313 - genesis-fuel-parameter:
314 installer: '{installer}'
315 gs-pathname: '{gs-pathname}'
319 credentials-id: '{ssh-credentials}'
325 - 'fuel-upload-artifact'
326 - 'fuel-workspace-cleanup'
330 recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
333 name: 'genesis-fuel-deploy-{stream}'
342 - genesis-fuel-parameter:
343 installer: '{installer}'
344 gs-pathname: '{gs-pathname}'
347 default: ssh://gerrit.opnfv.org:29418/$PROJECT
348 description: "POD2 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
352 credentials-id: '{ssh-credentials}'
359 artifactDaysToKeep: -1
360 artifactNumToKeep: -1
363 - 'fuel-download-artifact'
368 recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
371 name: 'genesis-fuel-lab-reconfig-{stream}'
380 artifactDaysToKeep: -1
381 artifactNumToKeep: -1
386 - genesis-fuel-parameter:
387 installer: '{installer}'
388 gs-pathname: '{gs-pathname}'
391 default: ssh://gerrit.opnfv.org:29418/$PROJECT
392 description: "Used for overriding the GIT URL coming from parameters macro."
396 credentials-id: '{ssh-credentials}'
402 use-build-blocker: true
404 - "genesis-foreman-daily.*"
407 - 'fuel-lab-reconfig'
410 name: 'genesis-fuel-verify-deploy-virtual-{stream}'
419 - genesis-fuel-parameter:
420 installer: '{installer}'
425 credentials-id: '{ssh-credentials}'
432 artifactDaysToKeep: -1
433 artifactNumToKeep: -1
436 - 'fuel-deploy-virtual'
438 ########################
440 ########################
442 name: genesis-fuel-parameter
446 default: '{installer}'
447 description: "Installer to use."
449 name: BUILD_DIRECTORY
450 default: $WORKSPACE/build_output
451 description: "Directory where the build artifact will be located upon the completion of the build."
453 name: CACHE_DIRECTORY
454 default: $HOME/opnfv/cache/genesis-$INSTALLER
455 description: "Directory where the cache to be used during the build is located."
458 default: https://gerrit.opnfv.org/gerrit/$PROJECT
459 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
462 default: artifacts.opnfv.org/$PROJECT/$INSTALLER{gs-pathname}
463 description: "URL to Google Storage."
465 ########################
467 ########################
477 # log info to console
478 echo "Starting the build of $INSTALLER. This could take some time..."
479 echo "--------------------------------------------------------"
482 # create the cache directory if it doesn't exist
483 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
485 # set OPNFV_ARTIFACT_VERSION
486 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
489 cd $WORKSPACE/$INSTALLER/ci
490 ./build.sh -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
492 # list the build artifacts
493 ls -al $BUILD_DIRECTORY
495 # save information regarding artifact into file
497 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
498 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
499 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
500 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
501 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
502 echo "OPNFV_BUILD_URL=$BUILD_URL"
503 ) > $WORKSPACE/opnfv.properties
506 echo "--------------------------------------------------------"
518 # source the file so we get OPNFV vars
519 source latest.properties
521 # echo the info about artifact that is used during the deployment
522 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
524 # create TMPDIR if it doesn't exist
525 export TMPDIR=$HOME/tmpdir
526 [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
528 # change permissions down to TMPDIR
532 # set CONFDIR, BRIDGE
533 export CONFDIR=$WORKSPACE/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
537 sudo $WORKSPACE/common/ci/clean.sh -base_config $WORKSPACE/foreman/ci/inventory/lf_pod2_ksgen_settings.yml
539 # prepare for Fuel Deployment
540 sudo $WORKSPACE/common/ci/setup.sh
542 # log info to console
543 echo "Starting the deployment using $INSTALLER. This could take some time..."
544 echo "--------------------------------------------------------"
547 # start the deployment
548 echo "Issuing command"
549 echo "sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh"
550 sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -nh
553 echo "--------------------------------------------------------"
557 name: 'fuel-deploy-virtual'
565 # log info to console
566 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
567 echo "--------------------------------------------------------"
570 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
573 echo "--------------------------------------------------------"
577 name: 'fuel-upload-artifact'
585 # log info to console
586 echo "Uploading the $INSTALLER artifact. This could take some time..."
587 echo "--------------------------------------------------------"
590 # source the opnfv.properties to get ARTIFACT_VERSION
591 source $WORKSPACE/opnfv.properties
593 # upload artifact and additional files to google storage
594 gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
595 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
596 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
599 echo "--------------------------------------------------------"
601 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
604 name: 'fuel-download-artifact'
612 # get the latest.properties file in order to get info regarding latest artifact
613 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
615 # check if we got the file
616 [[ -f latest.properties ]] || exit 1
618 # source the file so we get OPNFV vars
619 source latest.properties
621 # log info to console
622 echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
623 echo "This could take some time..."
624 echo "--------------------------------------------------------"
628 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
631 ls -al $WORKSPACE/opnfv.iso
634 echo "--------------------------------------------------------"
638 name: 'fuel-workspace-cleanup'
646 # delete everything that is in $WORKSPACE
647 /bin/rm -rf $WORKSPACE
650 name: 'fuel-lab-reconfig'
658 # check to see if ucs login info file exists
659 if [ -e ~/.ssh/ucs_creds ];then
660 source ~/.ssh/ucs_creds
662 echo "Unable to find UCS credentials for LF lab reconfiguration...Exiting"
667 echo "Cloning releng repo..."
668 if ! GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/releng; then
669 echo "Unable to clone releng repo...Exiting"
673 # log info to console
674 echo "Starting the lab reconfiguration for $INSTALLER..."
675 echo "--------------------------------------------------------"
679 $WORKSPACE/releng/utils/lab-reconfiguration/create_venv.sh
681 # disable nounset because 'activate' script contains unbound variable(s)
684 source $WORKSPACE/releng/utils/lab-reconfiguration/venv/bin/activate
685 # set nounset back again
688 # verify we are in venv
689 if [[ ! $(which python | grep venv) ]]; then
690 echo "Unable to activate venv...Exiting"
694 python $WORKSPACE/releng/utils/lab-reconfiguration/reconfigUcsNet.py -i $ucs_host -u $ucs_user -p $ucs_password -f $WORKSPACE/releng/utils/lab-reconfiguration/fuel.yaml
696 # while undergoing reboot
699 # check to see if slave is back up
702 while [ "$ping_counter" -lt 20 ]; do
703 if [[ $(ping -c 5 172.30.10.72) ]]; then
711 if [ "$ping_flag" -eq 1 ]; then
712 echo "Slave is pingable, now wait 180 seconds for services to start"
715 echo "Slave did not come back up after reboot: please check opnfv-jump-2"
723 echo "--------------------------------------------------------"
726 ########################
728 ########################
730 name: 'genesis-fuel-master-trigger'
735 name: 'genesis-fuel-stable-arno-trigger'