1 # this is the job configuration for bgs
9 - 'genesis-fuel-verify'
10 - 'genesis-fuel-merge'
11 - 'genesis-fuel-daily-{stream}'
12 - 'genesis-fuel-build'
13 - 'genesis-fuel-deploy'
15 # stream: branch with - in place of / (eg. stable-helium)
16 # branch: branch (eg. stable/helium)
23 ########################
25 ########################
28 name: 'genesis-fuel-verify'
30 project-type: freestyle
44 artifactDaysToKeep: -1
50 default: https://gerrit.opnfv.org/gerrit/genesis
51 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
54 default: 'artifacts.opnfv.org/genesis/fuel'
55 description: "URL to Google Storage."
58 default: $WORKSPACE/build_output
59 description: "Directory where the build artifact will be located upon the completion of the build."
62 default: $HOME/opnfv/cache/genesis-fuel
63 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
65 name: ARTIFACT_VERSION
67 description: "Version number to append to resulting ISO."
73 credentials-id: '{ssh-credentials}'
74 refspec: '$GERRIT_REFSPEC'
75 choosing-strategy: 'gerrit'
78 - ssh-agent-credentials:
79 user: '{ssh-credentials}'
84 - patchset-created-event:
85 exclude-drafts: 'false'
86 exclude-trivial-rebase: 'false'
87 exclude-no-code-change: 'false'
88 - draft-published-event
89 - comment-added-contains-event:
90 comment-contains-value: 'recheck'
91 - comment-added-contains-event:
92 comment-contains-value: 'reverify'
94 - project-compare-type: 'ANT'
95 project-pattern: 'genesis'
97 - branch-compare-type: 'ANT'
98 branch-pattern: '**/master'
108 - 'installer-cleanup'
111 name: 'genesis-fuel-merge'
113 # builder-merge job to run JJB update
115 # This job's purpose is to update all the JJB
117 project-type: freestyle
131 artifactDaysToKeep: -1
137 default: https://gerrit.opnfv.org/gerrit/genesis
138 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
141 default: 'artifacts.opnfv.org/genesis/fuel'
142 description: "URL to Google Storage."
144 name: BUILD_DIRECTORY
145 default: $WORKSPACE/build_output
146 description: "Directory where the build artifact will be located upon the completion of the build."
148 name: CACHE_DIRECTORY
149 default: $HOME/opnfv/cache/genesis-fuel
150 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
152 name: ARTIFACT_VERSION
154 description: "Version number to append to resulting ISO."
159 - gerrit-trigger-scm:
160 credentials-id: '{ssh-credentials}'
162 choosing-strategy: 'default'
165 - ssh-agent-credentials:
166 user: '{ssh-credentials}'
171 - change-merged-event
172 - comment-added-contains-event:
173 comment-contains-value: 'remerge'
175 - project-compare-type: 'ANT'
176 project-pattern: 'genesis'
178 - branch-compare-type: 'ANT'
179 branch-pattern: '**/master'
188 - 'installer-cleanup'
191 name: 'genesis-fuel-daily-{stream}'
193 project-type: freestyle
200 default: https://gerrit.opnfv.org/gerrit/genesis
201 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
204 default: origin/master
205 description: "Branch to build, deploy and test."
208 default: refs/heads/master
209 description: "Refspec to retrieve."
212 default: 'artifacts.opnfv.org/genesis/fuel'
213 description: "URL to Google Storage."
215 name: BUILD_DIRECTORY
216 default: $WORKSPACE/build_output
217 description: "Directory where the build artifact will be located upon the completion of the build."
219 name: CACHE_DIRECTORY
220 default: $HOME/opnfv/cache/genesis-fuel
221 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
223 name: ARTIFACT_VERSION
225 description: "Version number to append to resulting ISO."
229 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
237 refspec: $GERRIT_REFSPEC
240 - pollscm: '@midnight'
245 artifactDaysToKeep: -1
246 artifactNumToKeep: -1
250 - 'installer-upload-artifact'
251 - 'installer-deploy-quick-fix'
254 name: 'genesis-fuel-build'
256 project-type: freestyle
265 default: https://gerrit.opnfv.org/gerrit/genesis
266 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
269 default: origin/master
270 description: "Branch to build, deploy and test."
273 default: refs/heads/master
274 description: "Refspec to retrieve."
277 default: 'artifacts.opnfv.org/genesis/fuel'
278 description: "URL to Google Storage."
280 name: BUILD_DIRECTORY
281 default: $WORKSPACE/build_output
282 description: "Directory where the build artifact will be located upon the completion of the build."
284 name: CACHE_DIRECTORY
285 default: $HOME/opnfv/cache/genesis-fuel
286 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
288 name: ARTIFACT_VERSION
290 description: "Version number to append to resulting ISO."
294 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
302 refspec: $GERRIT_REFSPEC
307 artifactDaysToKeep: -1
308 artifactNumToKeep: -1
321 name: 'genesis-fuel-deploy'
323 project-type: freestyle
332 default: https://gerrit.opnfv.org/gerrit/genesis
333 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
336 default: origin/master
337 description: "Branch to build, deploy and test."
340 default: refs/heads/master
341 description: "Refspec to retrieve."
344 default: 'artifacts.opnfv.org/genesis/fuel'
345 description: "URL to Google Storage."
347 name: BUILD_DIRECTORY
348 default: $WORKSPACE/build_output
349 description: "Directory where the build artifact will be located upon the completion of the build."
351 name: CACHE_DIRECTORY
352 default: $HOME/opnfv/cache/genesis-fuel
353 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
355 name: ARTIFACT_VERSION
357 description: "Version number to append to resulting ISO."
361 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
369 refspec: $GERRIT_REFSPEC
374 artifactDaysToKeep: -1
375 artifactNumToKeep: -1
378 - 'installer-download-artifact'
382 name: installer-build
391 # this is here for quick tries with deployment
392 SKIP_BUILD=${SKIP_BUILD-0}
393 if [ "$SKIP_BUILD" == "1" ]; then
394 echo "Skipping build for deployment testing!"
397 echo "Proceeding with build first!"
400 # set/create the cache location
401 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
404 cd $WORKSPACE/fuel/ci
405 ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
407 # list the build artifacts
408 ls -al $BUILD_DIRECTORY
411 name: installer-deploy
420 # source the file so we get OPNFV vars
421 source latest.properties
423 # echo the info about artifact that is used during the deployment
424 echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f4) for deployment"
427 export TOPDIR=$WORKSPACE/fuel/prototypes/auto-deploy
429 # log info to console
430 echo "Startint the deployment. This could take some time..."
431 echo "--------------------------------------------------------"
434 # start the deployment
435 echo "sudo ${TOPDIR}/deploy/deploy.sh $WORKSPACE/opnfv.iso ${TOPDIR}/configs/lf_pod1/dea.yaml ${TOPDIR}/configs/lf_pod1/dha.yaml"
438 echo "--------------------------------------------------------"
442 name: installer-deploy-quick-fix
451 # this is just a quick fix to execute the deployment in a messy way
452 # will be fixed later on
453 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
456 name: installer-upload-artifact
465 # change the build directory where ISO is created
468 # save information regarding artifact into file
470 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
471 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
472 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$ARTIFACT_VERSION.iso"
473 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum opnfv-$ARTIFACT_VERSION.iso | cut -d' ' -f1)"
474 echo "OPNFV_BUILD_URL=$BUILD_URL"
475 echo "OPNFV_BUILD=OK"
476 ) > opnfv-$ARTIFACT_VERSION.properties
478 # copy artifact property file as latest.properties
479 # so we can directly get info regarding latest artifact
480 /bin/cp -f opnfv-$ARTIFACT_VERSION.properties latest.properties
482 # upload artifact and additional files to google storage
483 gsutil cp opnfv-$ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
484 gsutil cp opnfv-$ARTIFACT_VERSION.properties gs://$GS_URL/opnfv-$ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
485 gsutil cp latest.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
488 name: installer-download-artifact
497 # get the latest.properties file in order to get info regarding latest artifact
498 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
500 # check if we got the file
501 [[ -f latest.properties ]] || exit 1
503 # source the file so we get OPNFV vars
504 source latest.properties
507 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
510 ls -al $WORKSPACE/opnfv.iso
513 name: installer-cleanup
522 # delete everything that is in $WORKSPACE
523 /bin/rm -rf $WORKSPACE