1 # this is the job configuration for bgs
12 - 'genesis-{installer}-verify'
13 - 'genesis-{installer}-merge'
14 - 'genesis-{installer}-daily-{stream}'
15 - 'genesis-{installer}-build'
16 - 'genesis-{installer}-deploy'
18 # stream: branch with - in place of / (eg. stable-helium)
19 # branch: branch (eg. stable/helium)
25 ########################
27 ########################
30 name: 'genesis-{installer}-verify'
32 project-type: freestyle
39 artifactDaysToKeep: -1
45 default: '{installer}'
46 description: "Installer to use."
49 default: $WORKSPACE/build_output
52 default: '$HOME/opnfv/cache/genesis-{installer}'
55 default: https://gerrit.opnfv.org/gerrit/genesis
63 credentials-id: '{ssh-credentials}'
64 refspec: '$GERRIT_REFSPEC'
65 choosing-strategy: 'gerrit'
68 - ssh-agent-credentials:
69 user: '{ssh-credentials}'
74 - patchset-created-event:
75 exclude-drafts: 'false'
76 exclude-trivial-rebase: 'false'
77 exclude-no-code-change: 'false'
78 - draft-published-event
79 - comment-added-contains-event:
80 comment-contains-value: 'recheck'
81 - comment-added-contains-event:
82 comment-contains-value: 'reverify'
84 - project-compare-type: 'ANT'
85 project-pattern: 'genesis'
87 - branch-compare-type: 'ANT'
88 branch-pattern: '**/master'
93 pattern: '{installer}/**'
100 name: 'genesis-{installer}-merge'
102 # builder-merge job to run JJB update
104 # This job's purpose is to update all the JJB
106 project-type: freestyle
113 artifactDaysToKeep: -1
119 default: '{installer}'
120 description: "Installer to use."
122 name: BUILD_DIRECTORY
123 default: $WORKSPACE/build_output
125 name: CACHE_DIRECTORY
126 default: '$HOME/opnfv/cache/genesis-{installer}'
129 default: https://gerrit.opnfv.org/gerrit/genesis
136 - gerrit-trigger-scm:
137 credentials-id: '{ssh-credentials}'
139 choosing-strategy: 'default'
142 - ssh-agent-credentials:
143 user: '{ssh-credentials}'
148 - change-merged-event
149 - comment-added-contains-event:
150 comment-contains-value: 'remerge'
152 - project-compare-type: 'ANT'
153 project-pattern: 'genesis'
155 - branch-compare-type: 'ANT'
156 branch-pattern: '**/master'
161 pattern: '{installer}/**'
167 name: 'genesis-{installer}-daily-{stream}'
169 project-type: freestyle
176 default: '{installer}'
177 description: "Installer to use."
179 name: BUILD_DIRECTORY
180 default: $WORKSPACE/build_output
181 description: "Directory where the build artifact will be located upon the completion of the build."
183 name: CACHE_DIRECTORY
184 default: '$HOME/opnfv/cache/genesis-{installer}'
187 default: 'artifacts.opnfv.org/genesis/{installer}'
188 description: "URL to Google Storage."
191 default: https://gerrit.opnfv.org/gerrit/genesis
194 default: origin/master
195 description: "Branch to build, deploy and test."
198 default: refs/heads/master
199 description: "Refspec to retrieve."
207 refspec: $GERRIT_REFSPEC
210 - pollscm: '@midnight'
215 artifactDaysToKeep: -1
216 artifactNumToKeep: -1
223 name: 'genesis-{installer}-build'
225 project-type: freestyle
232 artifactDaysToKeep: -1
233 artifactNumToKeep: -1
236 - genesis-parameters:
237 installer: '{installer}'
240 default: 'extra_value'
241 description: "Installer to use."
244 default: 'overriden_value'
245 description: "Installer to use."
253 refspec: $GERRIT_REFSPEC
259 name: 'genesis-{installer}-deploy'
261 project-type: freestyle
268 artifactDaysToKeep: -1
269 artifactNumToKeep: -1
274 default: '{installer}'
275 description: "Installer to use."
278 default: https://gerrit.opnfv.org/gerrit/genesis
279 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
282 default: origin/master
283 description: "Branch to build, deploy and test."
286 default: refs/heads/master
287 description: "Refspec to retrieve."
290 default: 'artifacts.opnfv.org/genesis/{installer}'
291 description: "URL to Google Storage."
293 name: BUILD_DIRECTORY
294 default: $WORKSPACE/build_output
295 description: "Directory where the build artifact will be located upon the completion of the build."
303 refspec: $GERRIT_REFSPEC
308 ########################
310 ########################
312 name: genesis-parameters
316 default: '{installer}'
317 description: "Installer to use."
319 name: BUILD_DIRECTORY
320 default: $WORKSPACE/build_output
321 description: "Directory where the build artifact will be located upon the completion of the build."
323 name: CACHE_DIRECTORY
324 default: '$HOME/opnfv/cache/genesis-{installer}'
327 default: https://gerrit.opnfv.org/gerrit/genesis
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: origin/master
332 description: "Branch to build, deploy and test."
335 default: refs/heads/master
336 description: "Refspec to retrieve."
339 default: 'artifacts.opnfv.org/genesis/{installer}'
340 description: "URL to Google Storage."
342 ########################
344 ########################
355 # get the dependencies - temporary fix for RC0
356 [[ -d $WORKSPACE/$INSTALLER/build ]] || mkdir -p $WORKSPACE/$INSTALLER/build
357 cp /home/jenkins/Downloads/opnfv_iso/* $WORKSPACE/$INSTALLER/build/
359 # below lines perhaps need to be enabled in order to fetch images from internet
360 # as we are having disk space issues on ericsson-build slave
361 #wget http://ftp.riken.jp/Linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-Minimal.iso
362 #wget http://download.virtualbox.org/virtualbox/rpm/fedora/20/x86_64/VirtualBox-4.3-4.3.26_98988_fedora18-1.x86_64.rpm
363 #wget http://repos.duss-janser.ch/vagrant/vagrant_1.7.2_x86_64.rpm
366 cd $WORKSPACE/$INSTALLER/ci
367 ./build.sh $BUILD_DIRECTORY
369 # list the build artifacts
370 ls -al $BUILD_DIRECTORY
372 # remove the BUILD_DIRECTORY to reclaim some space
373 /bin/rm -rf $BUILD_DIRECTORY
385 # get the dependencies - temporary fix for RC0
386 [[ -d $WORKSPACE/$INSTALLER/build ]] || mkdir -p $WORKSPACE/$INSTALLER/build
387 cp /home/jenkins/Downloads/opnfv_iso/* $WORKSPACE/$INSTALLER/build/
389 # below lines perhaps need to be enabled in order to fetch images from internet
390 # as we are having disk space issues on ericsson-build slave
391 #wget http://ftp.riken.jp/Linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-Minimal.iso
392 #wget http://download.virtualbox.org/virtualbox/rpm/fedora/20/x86_64/VirtualBox-4.3-4.3.26_98988_fedora18-1.x86_64.rpm
393 #wget http://repos.duss-janser.ch/vagrant/vagrant_1.7.2_x86_64.rpm
396 cd $WORKSPACE/$INSTALLER/ci
397 ./build.sh $BUILD_DIRECTORY
399 # list the build artifacts
400 ls -al $BUILD_DIRECTORY
402 # remove the BUILD_DIRECTORY to reclaim some space
403 /bin/rm -rf $BUILD_DIRECTORY
415 # get the dependencies - temporary fix for RC0
416 [[ -d $WORKSPACE/$INSTALLER/build ]] || mkdir -p $WORKSPACE/$INSTALLER/build
417 cp /home/jenkins/Downloads/opnfv_iso/* $WORKSPACE/$INSTALLER/build/
419 # below lines perhaps need to be enabled in order to fetch images from internet
420 # as we are having disk space issues on ericsson-build slave
421 #wget http://ftp.riken.jp/Linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-Minimal.iso
422 #wget http://download.virtualbox.org/virtualbox/rpm/fedora/20/x86_64/VirtualBox-4.3-4.3.26_98988_fedora18-1.x86_64.rpm
423 #wget http://repos.duss-janser.ch/vagrant/vagrant_1.7.2_x86_64.rpm
426 cd $WORKSPACE/$INSTALLER/ci
427 ./build.sh -v $BUILD_ID $BUILD_DIRECTORY
436 # list the build artifacts
437 ls -al $BUILD_DIRECTORY
441 # save information regarding artifact into file
443 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
444 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
445 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$BUILD_ID.iso"
446 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum opnfv-$ARTIFACT_VERSION.iso | cut -d' ' -f1)"
447 echo "OPNFV_BUILD_URL=$BUILD_URL"
448 echo "OPNFV_BUILD=OK"
449 ) > opnfv-$BUILD_ID.properties
451 # copy artifact property file as latest.properties
452 # so we can directly get info regarding latest artifact
453 /bin/cp -f opnfv-$BUILD_ID.properties latest.properties
455 # upload artifact and additional files to google storage
456 gsutil cp OPNFV-CentOS-7-x86_64-$BUILD_ID.iso gs://$GS_URL/opnfv-$BUILD_ID.iso
457 gsutil cp opnfv-$BUILD_ID.properties gs://$GS_URL/opnfv-$BUILD_ID.properties
458 gsutil cp latest.properties gs://$GS_URL/latest.properties
467 # get the latest.properties file in order to get info regarding latest artifact
468 gsutil cp gs://$GS_URL/latest.properties latest.properties
470 # check if we got the file
471 [[ -f latest.properties ]] || exit 1
473 # source the file so we get OPNFV vars
474 source latest.properties
477 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
480 ls -al $WORKSPACE/opnfv.iso
482 # remove the BUILD_DIRECTORY and downlaoded artifact to reclaim some space
483 /bin/rm -rf $BUILD_DIRECTORY
484 /bin/rm -rf $WORKSPACE/opnfv.iso
510 sudo $WORKSPACE/$INSTALLER/ci/clean.sh -base_config $WORKSPACE/$INSTALLER/ci/inventory/lf_pod2_ksgen_settings.yml
512 # and then initiate deployment
513 sudo $WORKSPACE/$INSTALLER/ci/deploy.sh -base_config $WORKSPACE/$INSTALLER/ci/inventory/lf_pod2_ksgen_settings.yml