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}/**'
99 - 'fuel-workspace-cleanup'
102 name: 'genesis-fuel-merge'
104 project-type: freestyle
118 artifactDaysToKeep: -1
127 installer: '{installer}'
131 - gerrit-trigger-scm:
132 credentials-id: '{ssh-credentials}'
134 choosing-strategy: 'default'
137 - ssh-agent-credentials:
138 user: '{ssh-credentials}'
143 - change-merged-event
144 - comment-added-contains-event:
145 comment-contains-value: 'remerge'
147 - project-compare-type: 'ANT'
148 project-pattern: 'genesis'
150 - branch-compare-type: 'ANT'
151 branch-pattern: '**/master'
156 pattern: '{installer}/**'
160 - 'fuel-workspace-cleanup'
163 name: 'genesis-fuel-daily-{stream}'
165 project-type: freestyle
178 installer: '{installer}'
179 gs-pathname: '{gs-pathname}'
183 credentials-id: '{ssh-credentials}'
190 artifactDaysToKeep: -1
191 artifactNumToKeep: -1
195 - project: 'genesis-fuel-build-{stream}'
199 - project: 'genesis-fuel-deploy-{stream}'
203 - project: 'functest-opnfv-jump-1'
206 - project: 'yardstick-opnfv-jump-1'
210 name: 'genesis-fuel-build-{stream}'
212 project-type: freestyle
219 artifactDaysToKeep: -1
220 artifactNumToKeep: -1
226 installer: '{installer}'
227 gs-pathname: '{gs-pathname}'
231 credentials-id: '{ssh-credentials}'
237 - 'fuel-upload-artifact'
238 - 'fuel-workspace-cleanup'
241 name: 'genesis-fuel-deploy-{stream}'
243 project-type: freestyle
253 installer: '{installer}'
254 gs-pathname: '{gs-pathname}'
257 default: ssh://gerrit.opnfv.org:29418/$PROJECT
258 description: "POD1 has some issues with cloning using https so that's why GIT_BASE is overriden here again."
262 credentials-id: '{ssh-credentials}'
269 artifactDaysToKeep: -1
270 artifactNumToKeep: -1
273 - 'fuel-download-artifact'
277 name: 'genesis-fuel-deploy-virtual-master'
279 project-type: freestyle
289 installer: '{installer}'
294 credentials-id: '{ssh-credentials}'
301 artifactDaysToKeep: -1
302 artifactNumToKeep: -1
305 - 'fuel-deploy-virtual'
307 ########################
309 ########################
315 default: '{installer}'
316 description: "Installer to use."
318 name: BUILD_DIRECTORY
319 default: $WORKSPACE/build_output
320 description: "Directory where the build artifact will be located upon the completion of the build."
322 name: CACHE_DIRECTORY
323 default: $HOME/opnfv/cache/genesis-$INSTALLER
324 description: "Directory where the cache to be used during the build is located."
327 default: https://gerrit.opnfv.org/gerrit/$PROJECT
328 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
331 default: artifacts.opnfv.org/$PROJECT/$INSTALLER{gs-pathname}
332 description: "URL to Google Storage."
334 ########################
336 ########################
346 # log info to console
347 echo "Starting the build of $INSTALLER. This could take some time..."
348 echo "--------------------------------------------------------"
351 # create the cache directory if it doesn't exist
352 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
354 # set OPNFV_ARTIFACT_VERSION
355 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
358 cd $WORKSPACE/$INSTALLER/ci
359 ./build.sh -v $OPNFV_ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
361 # list the build artifacts
362 ls -al $BUILD_DIRECTORY
364 # save information regarding artifact into file
366 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
367 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
368 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
369 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
370 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso | cut -d' ' -f1)"
371 echo "OPNFV_BUILD_URL=$BUILD_URL"
372 ) > $WORKSPACE/opnfv.properties
375 echo "--------------------------------------------------------"
387 # source the file so we get OPNFV vars
388 source latest.properties
390 # echo the info about artifact that is used during the deployment
391 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
393 # create TMPDIR if it doesn't exist
394 export TMPDIR=$HOME/tmpdir
395 [[ -d $TMPDIR ]] || mkdir -p $TMPDIR
397 # change permissions down to TMPDIR
402 export TOPDIR=$WORKSPACE/fuel/prototypes/auto-deploy
404 # log info to console
405 echo "Starting the deployment using $INSTALLER. This could take some time..."
406 echo "--------------------------------------------------------"
409 # start the deployment
410 echo "Issuing command"
411 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"
412 sudo TMPDIR=${TMPDIR} ${TOPDIR}/deploy/deploy.sh ${WORKSPACE}/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea_no-ha.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml
415 echo "--------------------------------------------------------"
419 name: 'fuel-deploy-virtual'
427 # log info to console
428 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
429 echo "--------------------------------------------------------"
432 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
435 echo "--------------------------------------------------------"
439 name: 'fuel-upload-artifact'
447 # log info to console
448 echo "Uploading the $INSTALLER artifact. This could take some time..."
449 echo "--------------------------------------------------------"
452 # source the opnfv.properties to get ARTIFACT_VERSION
453 source $WORKSPACE/opnfv.properties
455 # upload artifact and additional files to google storage
456 gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
457 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
458 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
461 echo "--------------------------------------------------------"
463 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
466 name: 'fuel-download-artifact'
474 # get the latest.properties file in order to get info regarding latest artifact
475 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
477 # check if we got the file
478 [[ -f latest.properties ]] || exit 1
480 # source the file so we get OPNFV vars
481 source latest.properties
483 # log info to console
484 echo "Downloading the $INSTALLER artifact using URL http://$OPNFV_ARTIFACT_URL"
485 echo "This could take some time..."
486 echo "--------------------------------------------------------"
490 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
493 ls -al $WORKSPACE/opnfv.iso
496 echo "--------------------------------------------------------"
500 name: 'fuel-workspace-cleanup'
508 # delete everything that is in $WORKSPACE
509 /bin/rm -rf $WORKSPACE
511 ########################
513 ########################
517 - pollscm: '0 21 * * *'
520 name: 'fuel-stable-arno'
522 - pollscm: '0 3 * * *'