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)
32 ########################
34 ########################
37 name: 'genesis-fuel-verify-build-{stream}'
39 project-type: freestyle
53 artifactDaysToKeep: -1
62 installer: '{installer}'
63 gs-pathname: '{gs-pathname}'
67 credentials-id: '{ssh-credentials}'
68 refspec: '$GERRIT_REFSPEC'
69 choosing-strategy: 'gerrit'
72 - ssh-agent-credentials:
73 user: '{ssh-credentials}'
78 - patchset-created-event:
79 exclude-drafts: 'false'
80 exclude-trivial-rebase: 'false'
81 exclude-no-code-change: 'false'
82 - draft-published-event
83 - comment-added-contains-event:
84 comment-contains-value: 'recheck'
85 - comment-added-contains-event:
86 comment-contains-value: 'reverify'
88 - project-compare-type: 'ANT'
89 project-pattern: 'genesis'
91 - branch-compare-type: 'ANT'
92 branch-pattern: '**/{branch}'
95 pattern: 'common/ci/**'
97 pattern: 'common/manifests/**'
99 pattern: 'common/puppet-opnfv/**'
101 pattern: 'common/tools/**'
103 pattern: '{installer}/build/**'
105 pattern: '{installer}/ci/**'
107 pattern: '{installer}/deploy/**'
109 pattern: '{installer}/include/**'
111 pattern: '{installer}/prototypes/**'
112 forbidden-file-paths:
114 pattern: 'common/docs/**'
116 pattern: '{installer}/docs/**'
120 - 'fuel-workspace-cleanup'
123 name: 'genesis-fuel-merge-{stream}'
125 project-type: freestyle
139 artifactDaysToKeep: -1
148 installer: '{installer}'
152 - gerrit-trigger-scm:
153 credentials-id: '{ssh-credentials}'
155 choosing-strategy: 'default'
158 - ssh-agent-credentials:
159 user: '{ssh-credentials}'
164 - change-merged-event
165 - comment-added-contains-event:
166 comment-contains-value: 'remerge'
168 - project-compare-type: 'ANT'
169 project-pattern: 'genesis'
171 - branch-compare-type: 'ANT'
172 branch-pattern: '**/{branch}'
175 pattern: 'common/ci/**'
177 pattern: 'common/manifests/**'
179 pattern: 'common/puppet-opnfv/**'
181 pattern: 'common/tools/**'
183 pattern: '{installer}/build/**'
185 pattern: '{installer}/ci/**'
187 pattern: '{installer}/deploy/**'
189 pattern: '{installer}/include/**'
191 pattern: '{installer}/prototypes/**'
192 forbidden-file-paths:
194 pattern: 'common/docs/**'
196 pattern: '{installer}/docs/**'
200 - 'fuel-workspace-cleanup'
203 name: 'genesis-fuel-daily-{stream}'
205 project-type: freestyle
218 installer: '{installer}'
219 gs-pathname: '{gs-pathname}'
223 credentials-id: '{ssh-credentials}'
230 artifactDaysToKeep: -1
231 artifactNumToKeep: -1
235 - project: 'genesis-fuel-build-{stream}'
239 - project: 'genesis-fuel-lab-reconfig-{stream}'
243 - project: 'genesis-fuel-deploy-{stream}'
247 - project: 'functest-fuel-{stream}'
250 build-step-failure-threshold: 'never'
251 failure-threshold: 'never'
252 unstable-threshold: 'FAILURE'
254 - project: 'yardstick-fuel-{stream}'
257 build-step-failure-threshold: 'never'
258 failure-threshold: 'never'
259 unstable-threshold: 'FAILURE'
262 name: 'genesis-fuel-deploy-runner-{stream}'
264 project-type: freestyle
273 artifactDaysToKeep: -1
274 artifactNumToKeep: -1
280 installer: '{installer}'
281 gs-pathname: '{gs-pathname}'
284 default: ssh://gerrit.opnfv.org:29418/$PROJECT
285 description: "Used for overriding the GIT URL coming from parameters macro."
289 credentials-id: '{ssh-credentials}'
295 use-build-blocker: true
297 - "genesis-foreman-daily.*"
298 - "genesis-foreman-deploy-runner-{stream}"
299 - "genesis-fuel-daily.*"
302 - 'fuel-lab-reconfig'
304 - project: 'genesis-fuel-deploy-{stream}'
309 name: 'genesis-fuel-build-{stream}'
311 project-type: freestyle
318 artifactDaysToKeep: -1
319 artifactNumToKeep: -1
325 installer: '{installer}'
326 gs-pathname: '{gs-pathname}'
330 credentials-id: '{ssh-credentials}'
336 - 'fuel-upload-artifact'
337 - 'fuel-workspace-cleanup'
341 recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
344 name: 'genesis-fuel-deploy-{stream}'
346 project-type: freestyle
356 installer: '{installer}'
357 gs-pathname: '{gs-pathname}'
360 default: ssh://gerrit.opnfv.org:29418/$PROJECT
361 description: "POD2 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
365 credentials-id: '{ssh-credentials}'
372 artifactDaysToKeep: -1
373 artifactNumToKeep: -1
376 - 'fuel-download-artifact'
377 - 'fuel-opendaylight-plugin-build'
382 recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
385 name: 'genesis-fuel-lab-reconfig-{stream}'
387 project-type: freestyle
396 artifactDaysToKeep: -1
397 artifactNumToKeep: -1
403 installer: '{installer}'
404 gs-pathname: '{gs-pathname}'
407 default: ssh://gerrit.opnfv.org:29418/$PROJECT
408 description: "Used for overriding the GIT URL coming from parameters macro."
412 credentials-id: '{ssh-credentials}'
418 use-build-blocker: true
420 - "genesis-foreman-daily.*"
423 - 'fuel-lab-reconfig'
426 name: 'genesis-fuel-verify-deploy-virtual-{stream}'
428 project-type: freestyle
438 installer: '{installer}'
443 credentials-id: '{ssh-credentials}'
450 artifactDaysToKeep: -1
451 artifactNumToKeep: -1
454 - 'fuel-deploy-virtual'
456 ########################
458 ########################
464 default: '{installer}'
465 description: "Installer to use."
467 name: BUILD_DIRECTORY
468 default: $WORKSPACE/build_output
469 description: "Directory where the build artifact will be located upon the completion of the build."
471 name: CACHE_DIRECTORY
472 default: $HOME/opnfv/cache/genesis-$INSTALLER
473 description: "Directory where the cache to be used during the build is located."
476 default: https://gerrit.opnfv.org/gerrit/$PROJECT
477 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
480 default: artifacts.opnfv.org/$PROJECT/$INSTALLER{gs-pathname}
481 description: "URL to Google Storage."
483 ########################
485 ########################
495 # log info to console
496 echo "Starting the build of $INSTALLER. This could take some time..."
497 echo "--------------------------------------------------------"
500 # create the cache directory if it doesn't exist
501 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
503 # set OPNFV_ARTIFACT_VERSION
504 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
507 cd $WORKSPACE/$INSTALLER/ci
508 ./build.sh -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
510 # list the build artifacts
511 ls -al $BUILD_DIRECTORY
513 # save information regarding artifact into file
515 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
516 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
517 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
518 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
519 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
520 echo "OPNFV_BUILD_URL=$BUILD_URL"
521 ) > $WORKSPACE/opnfv.properties
524 echo "--------------------------------------------------------"
528 name: 'fuel-opendaylight-plugin-build'
536 # log info to console
537 echo "Starting the build of Fuel Opendaylight Plugin. This could take some time..."
538 echo "--------------------------------------------------------"
541 export ODL_PLUGIN_BRANCH="juno/lithium-sr1"
544 git clone https://github.com/stackforge/fuel-plugin-opendaylight
546 pushd $WORKSPACE/fuel-plugin-opendaylight
547 git checkout $ODL_PLUGIN_BRANCH
550 fpb --build fuel-plugin-opendaylight/
553 echo "--------------------------------------------------------"
565 # source the file so we get OPNFV vars
566 source latest.properties
568 # echo the info about artifact that is used during the deployment
569 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
571 # create TMPDIR if it doesn't exist
572 export TMPDIR=$HOME/tmpdir
573 [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
575 # change permissions down to TMPDIR
579 # set CONFDIR, BRIDGE
580 export CONFDIR=$WORKSPACE/fuel/deploy/templates/hardware_environment/conf/linux_foundation_lab/pod2
582 export PLUGIN=$WORKSPACE/fuel-plugin-opendaylight
585 sudo $WORKSPACE/common/ci/clean.sh -base_config $WORKSPACE/foreman/ci/inventory/lf_pod2_ksgen_settings.yml
587 # prepare for Fuel Deployment
588 sudo $WORKSPACE/common/ci/setup.sh
590 # log info to console
591 echo "Starting the deployment using $INSTALLER. This could take some time..."
592 echo "--------------------------------------------------------"
595 # start the deployment
596 echo "Issuing command"
597 echo "sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -p $PLUGIN"
598 sudo $WORKSPACE/fuel/ci/deploy.sh -iso $WORKSPACE/opnfv.iso -dea $CONFDIR/dea.yaml -dha $CONFDIR/dha.yaml -s $TMPDIR -b $BRIDGE -p $PLUGIN
601 echo "--------------------------------------------------------"
605 name: 'fuel-deploy-virtual'
613 # log info to console
614 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
615 echo "--------------------------------------------------------"
618 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
621 echo "--------------------------------------------------------"
625 name: 'fuel-upload-artifact'
633 # log info to console
634 echo "Uploading the $INSTALLER artifact. This could take some time..."
635 echo "--------------------------------------------------------"
638 # source the opnfv.properties to get ARTIFACT_VERSION
639 source $WORKSPACE/opnfv.properties
641 # upload artifact and additional files to google storage
642 gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
643 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
644 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
647 echo "--------------------------------------------------------"
649 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
652 name: 'fuel-download-artifact'
660 # get the latest.properties file in order to get info regarding latest artifact
661 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
663 # check if we got the file
664 [[ -f latest.properties ]] || exit 1
666 # source the file so we get OPNFV vars
667 source latest.properties
669 # log info to console
670 echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
671 echo "This could take some time..."
672 echo "--------------------------------------------------------"
676 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
679 ls -al $WORKSPACE/opnfv.iso
682 echo "--------------------------------------------------------"
686 name: 'fuel-workspace-cleanup'
694 # delete everything that is in $WORKSPACE
695 /bin/rm -rf $WORKSPACE
698 name: 'fuel-lab-reconfig'
706 # check to see if ucs login info file exists
707 if [ -e ~/.ssh/ucs_creds ];then
708 source ~/.ssh/ucs_creds
710 echo "Unable to find UCS credentials for LF lab reconfiguration...Exiting"
715 echo "Cloning releng repo..."
716 if ! GIT_SSL_NO_VERIFY=true git clone https://gerrit.opnfv.org/gerrit/releng; then
717 echo "Unable to clone releng repo...Exiting"
721 # log info to console
722 echo "Starting the lab reconfiguration for $INSTALLER..."
723 echo "--------------------------------------------------------"
727 $WORKSPACE/releng/utils/lab-reconfiguration/create_venv.sh
729 # disable nounset because 'activate' script contains unbound variable(s)
732 source $WORKSPACE/releng/utils/lab-reconfiguration/venv/bin/activate
733 # set nounset back again
736 # verify we are in venv
737 if [[ ! $(which python | grep venv) ]]; then
738 echo "Unable to activate venv...Exiting"
742 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
744 # while undergoing reboot
747 # check to see if slave is back up
750 while [ "$ping_counter" -lt 20 ]; do
751 if [[ $(ping -c 5 172.30.10.72) ]]; then
759 if [ "$ping_flag" -eq 1 ]; then
760 echo "Slave is pingable, now wait 180 seconds for services to start"
763 echo "Slave did not come back up after reboot: please check opnfv-jump-2"
771 echo "--------------------------------------------------------"
774 ########################
776 ########################
783 name: 'fuel-stable-arno'