1 ########################
2 # Job configuration for genesis/fuel
3 ########################
13 - 'genesis-fuel-verify-{stream}'
14 - 'genesis-fuel-merge'
15 - 'genesis-fuel-daily-{stream}'
16 - 'genesis-fuel-build-{stream}'
17 - 'genesis-fuel-deploy-{stream}'
18 - 'genesis-fuel-deploy-virtual-master'
20 # stream: branch with - in place of / (eg. stable-arno)
21 # branch: branch (eg. stable/arno)
30 ########################
32 ########################
35 name: 'genesis-fuel-verify-{stream}'
37 project-type: freestyle
51 artifactDaysToKeep: -1
60 installer: '{installer}'
61 gs-pathname: '{gs-pathname}'
65 credentials-id: '{ssh-credentials}'
66 refspec: '$GERRIT_REFSPEC'
67 choosing-strategy: 'gerrit'
70 - ssh-agent-credentials:
71 user: '{ssh-credentials}'
76 - patchset-created-event:
77 exclude-drafts: 'false'
78 exclude-trivial-rebase: 'false'
79 exclude-no-code-change: 'false'
80 - draft-published-event
81 - comment-added-contains-event:
82 comment-contains-value: 'recheck'
83 - comment-added-contains-event:
84 comment-contains-value: 'reverify'
86 - project-compare-type: 'ANT'
87 project-pattern: 'genesis'
89 - branch-compare-type: 'ANT'
90 branch-pattern: '**/{branch}'
95 pattern: '{installer}/**'
101 name: 'genesis-fuel-merge'
103 project-type: freestyle
117 artifactDaysToKeep: -1
126 installer: '{installer}'
130 - gerrit-trigger-scm:
131 credentials-id: '{ssh-credentials}'
133 choosing-strategy: 'default'
136 - ssh-agent-credentials:
137 user: '{ssh-credentials}'
142 - change-merged-event
143 - comment-added-contains-event:
144 comment-contains-value: 'remerge'
146 - project-compare-type: 'ANT'
147 project-pattern: 'genesis'
149 - branch-compare-type: 'ANT'
150 branch-pattern: '**/master'
155 pattern: '{installer}/**'
161 name: 'genesis-fuel-daily-{stream}'
163 project-type: freestyle
176 installer: '{installer}'
177 gs-pathname: '{gs-pathname}'
181 credentials-id: '{ssh-credentials}'
188 artifactDaysToKeep: -1
189 artifactNumToKeep: -1
193 - project: 'genesis-fuel-build-{stream}'
197 - project: 'genesis-fuel-deploy-{stream}'
201 - project: 'functest-opnfv-jump-1'
204 - project: 'yardstick-opnfv-jump-1'
208 name: 'genesis-fuel-build-{stream}'
210 project-type: freestyle
217 artifactDaysToKeep: -1
218 artifactNumToKeep: -1
224 installer: '{installer}'
225 gs-pathname: '{gs-pathname}'
229 credentials-id: '{ssh-credentials}'
235 - 'fuel-upload-artifact'
238 name: 'genesis-fuel-deploy-{stream}'
240 project-type: freestyle
250 installer: '{installer}'
251 gs-pathname: '{gs-pathname}'
254 default: ssh://gerrit.opnfv.org:29418/$PROJECT
255 description: "POD1 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
259 credentials-id: '{ssh-credentials}'
266 artifactDaysToKeep: -1
267 artifactNumToKeep: -1
270 - 'fuel-download-artifact'
274 name: 'genesis-fuel-deploy-virtual-master'
276 project-type: freestyle
286 installer: '{installer}'
291 credentials-id: '{ssh-credentials}'
298 artifactDaysToKeep: -1
299 artifactNumToKeep: -1
302 - 'fuel-deploy-virtual'
304 ########################
306 ########################
312 default: '{installer}'
313 description: "Installer to use."
315 name: BUILD_DIRECTORY
316 default: $WORKSPACE/build_output
317 description: "Directory where the build artifact will be located upon the completion of the build."
319 name: CACHE_DIRECTORY
320 default: $HOME/opnfv/cache/genesis-$INSTALLER
321 description: "Directory where the cache to be used during the build is located."
324 default: https://gerrit.opnfv.org/gerrit/$PROJECT
325 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
328 default: artifacts.opnfv.org/$PROJECT/$INSTALLER{gs-pathname}
329 description: "URL to Google Storage."
331 ########################
333 ########################
343 # log info to console
344 echo "Starting the build of $INSTALLER. This could take some time..."
345 echo "--------------------------------------------------------"
348 # create the cache directory if it doesn't exist
349 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
351 # set OPNFV_ARTIFACT_VERSION
352 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
355 cd $WORKSPACE/$INSTALLER/ci
356 ./build.sh -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
358 # list the build artifacts
359 ls -al $BUILD_DIRECTORY
361 # save information regarding artifact into file
363 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
364 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
365 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
366 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
367 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
368 echo "OPNFV_BUILD_URL=$BUILD_URL"
369 ) > $WORKSPACE/opnfv.properties
372 echo "--------------------------------------------------------"
384 # source the file so we get OPNFV vars
385 source latest.properties
387 # echo the info about artifact that is used during the deployment
388 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
390 # create TMPDIR if it doesn't exist
391 export TMPDIR=$HOME/tmpdir
392 [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
394 # change permissions down to TMPDIR
399 export TOPDIR=$WORKSPACE/fuel/prototypes/auto-deploy
401 # log info to console
402 echo "Starting the deployment using $INSTALLER. This could take some time..."
403 echo "--------------------------------------------------------"
406 # start the deployment
407 echo "Issuing command"
408 echo "sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea_no-ha.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml"
409 sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea_no-ha.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml
412 echo "--------------------------------------------------------"
416 name: 'fuel-deploy-virtual'
424 # log info to console
425 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
426 echo "--------------------------------------------------------"
429 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
432 echo "--------------------------------------------------------"
436 name: 'fuel-upload-artifact'
444 # log info to console
445 echo "Uploading the $INSTALLER artifact. This could take some time..."
446 echo "--------------------------------------------------------"
449 # source the opnfv.properties to get ARTIFACT_VERSION
450 source $WORKSPACE/opnfv.properties
452 # upload artifact and additional files to google storage
453 gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
454 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
455 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
458 echo "--------------------------------------------------------"
460 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
463 name: 'fuel-download-artifact'
471 # get the latest.properties file in order to get info regarding latest artifact
472 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
474 # check if we got the file
475 [[ -f latest.properties ]] || exit 1
477 # source the file so we get OPNFV vars
478 source latest.properties
480 # log info to console
481 echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
482 echo "This could take some time..."
483 echo "--------------------------------------------------------"
487 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
490 ls -al $WORKSPACE/opnfv.iso
493 echo "--------------------------------------------------------"
497 name: 'fuel-workspace-cleanup'
505 # delete everything that is in $WORKSPACE
506 /bin/rm -rf $WORKSPACE
508 ########################
510 ########################
514 - pollscm: '0 21 * * *'
517 name: 'fuel-stable-arno'
519 - pollscm: '0 3 * * *'