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'
16 # stream: branch with - in place of / (eg. stable-helium)
17 # branch: branch (eg. stable/helium)
24 ########################
26 ########################
29 name: 'genesis-fuel-verify'
31 project-type: freestyle
45 artifactDaysToKeep: -1
51 default: https://gerrit.opnfv.org/gerrit/genesis
52 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
55 default: 'artifacts.opnfv.org/genesis/fuel'
56 description: "URL to Google Storage."
59 default: $WORKSPACE/build_output
60 description: "Directory where the build artifact will be located upon the completion of the build."
63 default: $HOME/opnfv/cache/genesis-fuel
64 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
66 name: ARTIFACT_VERSION
68 description: "Version number to append to resulting ISO."
74 credentials-id: '{ssh-credentials}'
75 refspec: '$GERRIT_REFSPEC'
76 choosing-strategy: 'gerrit'
79 - ssh-agent-credentials:
80 user: '{ssh-credentials}'
85 - patchset-created-event:
86 exclude-drafts: 'false'
87 exclude-trivial-rebase: 'false'
88 exclude-no-code-change: 'false'
89 - draft-published-event
90 - comment-added-contains-event:
91 comment-contains-value: 'recheck'
92 - comment-added-contains-event:
93 comment-contains-value: 'reverify'
95 - project-compare-type: 'ANT'
96 project-pattern: 'genesis'
98 - branch-compare-type: 'ANT'
99 branch-pattern: '**/master'
109 - 'installer-cleanup'
112 name: 'genesis-fuel-merge'
114 # builder-merge job to run JJB update
116 # This job's purpose is to update all the JJB
118 project-type: freestyle
132 artifactDaysToKeep: -1
138 default: https://gerrit.opnfv.org/gerrit/genesis
139 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
142 default: 'artifacts.opnfv.org/genesis/fuel'
143 description: "URL to Google Storage."
145 name: BUILD_DIRECTORY
146 default: $WORKSPACE/build_output
147 description: "Directory where the build artifact will be located upon the completion of the build."
149 name: CACHE_DIRECTORY
150 default: $HOME/opnfv/cache/genesis-fuel
151 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
153 name: ARTIFACT_VERSION
155 description: "Version number to append to resulting ISO."
160 - gerrit-trigger-scm:
161 credentials-id: '{ssh-credentials}'
163 choosing-strategy: 'default'
166 - ssh-agent-credentials:
167 user: '{ssh-credentials}'
172 - change-merged-event
173 - comment-added-contains-event:
174 comment-contains-value: 'remerge'
176 - project-compare-type: 'ANT'
177 project-pattern: 'genesis'
179 - branch-compare-type: 'ANT'
180 branch-pattern: '**/master'
189 - 'installer-cleanup'
192 name: 'genesis-fuel-daily-{stream}'
194 project-type: freestyle
201 default: https://gerrit.opnfv.org/gerrit/genesis
202 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
205 default: origin/master
206 description: "Branch to build, deploy and test."
209 default: refs/heads/master
210 description: "Refspec to retrieve."
213 default: 'artifacts.opnfv.org/genesis/fuel'
214 description: "URL to Google Storage."
216 name: BUILD_DIRECTORY
217 default: $WORKSPACE/build_output
218 description: "Directory where the build artifact will be located upon the completion of the build."
220 name: CACHE_DIRECTORY
221 default: $HOME/opnfv/cache/genesis-fuel
222 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
224 name: ARTIFACT_VERSION
226 description: "Version number to append to resulting ISO."
230 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
238 refspec: $GERRIT_REFSPEC
241 - pollscm: '@midnight'
246 artifactDaysToKeep: -1
247 artifactNumToKeep: -1
251 - 'installer-upload-artifact'
252 - 'installer-deploy-quick-fix'
255 name: 'genesis-fuel-build'
257 project-type: freestyle
266 default: https://gerrit.opnfv.org/gerrit/genesis
267 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
270 default: origin/master
271 description: "Branch to build, deploy and test."
274 default: refs/heads/master
275 description: "Refspec to retrieve."
278 default: 'artifacts.opnfv.org/genesis/fuel'
279 description: "URL to Google Storage."
281 name: BUILD_DIRECTORY
282 default: $WORKSPACE/build_output
283 description: "Directory where the build artifact will be located upon the completion of the build."
285 name: CACHE_DIRECTORY
286 default: $HOME/opnfv/cache/genesis-fuel
287 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
289 name: ARTIFACT_VERSION
291 description: "Version number to append to resulting ISO."
295 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
303 refspec: $GERRIT_REFSPEC
308 artifactDaysToKeep: -1
309 artifactNumToKeep: -1
322 name: 'genesis-fuel-deploy'
324 project-type: freestyle
333 default: https://gerrit.opnfv.org/gerrit/genesis
334 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
337 default: origin/master
338 description: "Branch to build, deploy and test."
341 default: refs/heads/master
342 description: "Refspec to retrieve."
345 default: 'artifacts.opnfv.org/genesis/fuel'
346 description: "URL to Google Storage."
348 name: BUILD_DIRECTORY
349 default: $WORKSPACE/build_output
350 description: "Directory where the build artifact will be located upon the completion of the build."
352 name: CACHE_DIRECTORY
353 default: $HOME/opnfv/cache/genesis-fuel
354 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
356 name: ARTIFACT_VERSION
358 description: "Version number to append to resulting ISO."
362 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
370 refspec: $GERRIT_REFSPEC
375 artifactDaysToKeep: -1
376 artifactNumToKeep: -1
389 name: 'genesis-fuel-test'
391 project-type: freestyle
400 default: https://gerrit.opnfv.org/gerrit/genesis
401 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
404 default: origin/master
405 description: "Branch to build, deploy and test."
408 default: refs/heads/master
409 description: "Refspec to retrieve."
412 default: 'artifacts.opnfv.org/genesis/fuel'
413 description: "URL to Google Storage."
415 name: BUILD_DIRECTORY
416 default: $WORKSPACE/build_output
417 description: "Directory where the build artifact will be located upon the completion of the build."
419 name: CACHE_DIRECTORY
420 default: $HOME/opnfv/cache/genesis-fuel
421 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
423 name: ARTIFACT_VERSION
425 description: "Version number to append to resulting ISO."
429 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
437 refspec: $GERRIT_REFSPEC
442 artifactDaysToKeep: -1
443 artifactNumToKeep: -1
456 name: installer-build
465 # this is here for quick tries with deployment
466 SKIP_BUILD=${SKIP_BUILD-0}
467 if [ "$SKIP_BUILD" == "1" ]; then
468 echo "Skipping build for deployment testing!"
471 echo "Proceeding with build first!"
474 # set/create the cache location
475 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
478 cd $WORKSPACE/fuel/ci
479 ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
481 # list the build artifacts
482 ls -al $BUILD_DIRECTORY
485 name: installer-deploy-quick-fix
494 # this is just a quick fix to execute the deployment in a messy way
495 # will be fixed later on
496 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
509 echo "Here is where we are supposed to run FuncTest"
512 name: installer-upload-artifact
521 # change the build directory where ISO is created
524 # save information regarding artifact into file
526 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
527 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
528 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$ARTIFACT_VERSION.iso"
529 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum opnfv-$ARTIFACT_VERSION.iso | cut -d' ' -f1)"
530 echo "OPNFV_BUILD_URL=$BUILD_URL"
531 echo "OPNFV_BUILD=OK"
532 ) > opnfv-$ARTIFACT_VERSION.properties
534 # copy artifact property file as latest.properties
535 # so we can directly get info regarding latest artifact
536 /bin/cp -f opnfv-$ARTIFACT_VERSION.properties latest.properties
538 # upload artifact and additional files to google storage
539 gsutil cp opnfv-$ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
540 gsutil cp opnfv-$ARTIFACT_VERSION.properties gs://$GS_URL/opnfv-$ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
541 gsutil cp latest.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
544 name: installer-download-artifact
553 # get the latest.properties file in order to get info regarding latest artifact
554 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
556 # check if we got the file
557 [[ -f latest.properties ]] || exit 1
559 # source the file so we get OPNFV vars
560 source latest.properties
563 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
566 ls -al $WORKSPACE/opnfv.iso
569 name: installer-cleanup
578 # delete everything that is in $WORKSPACE
579 /bin/rm -rf $WORKSPACE