1 # this is the job configuration for bgs
10 - 'genesis-{installer}-verify'
11 - 'genesis-{installer}-merge'
12 - 'genesis-{installer}-daily-{stream}'
13 - 'genesis-{installer}-deploy'
15 # stream: branch with - in place of / (eg. stable-helium)
16 # branch: branch (eg. stable/helium)
23 ########################
25 ########################
28 name: 'genesis-{installer}-verify'
30 project-type: freestyle
37 artifactDaysToKeep: -1
43 default: '{installer}'
44 description: "Installer to use."
47 default: $WORKSPACE/build_output
50 default: https://gerrit.opnfv.org/gerrit/genesis
58 credentials-id: '{ssh-credentials}'
59 refspec: '$GERRIT_REFSPEC'
60 choosing-strategy: 'gerrit'
63 - ssh-agent-credentials:
64 user: '{ssh-credentials}'
69 - patchset-created-event:
70 exclude-drafts: 'false'
71 exclude-trivial-rebase: 'false'
72 exclude-no-code-change: 'false'
73 - draft-published-event
74 - comment-added-contains-event:
75 comment-contains-value: 'recheck'
76 - comment-added-contains-event:
77 comment-contains-value: 'reverify'
79 - project-compare-type: 'ANT'
80 project-pattern: 'genesis'
82 - branch-compare-type: 'ANT'
83 branch-pattern: '**/master'
88 pattern: '{installer}/**'
95 name: 'genesis-{installer}-merge'
97 # builder-merge job to run JJB update
99 # This job's purpose is to update all the JJB
101 project-type: freestyle
108 artifactDaysToKeep: -1
114 default: '{installer}'
115 description: "Installer to use."
117 name: BUILD_DIRECTORY
118 default: $WORKSPACE/build_output
121 default: https://gerrit.opnfv.org/gerrit/genesis
128 - gerrit-trigger-scm:
129 credentials-id: '{ssh-credentials}'
131 choosing-strategy: 'default'
134 - ssh-agent-credentials:
135 user: '{ssh-credentials}'
140 - change-merged-event
141 - comment-added-contains-event:
142 comment-contains-value: 'remerge'
144 - project-compare-type: 'ANT'
145 project-pattern: 'genesis'
147 - branch-compare-type: 'ANT'
148 branch-pattern: '**/master'
153 pattern: '{installer}/**'
159 name: 'genesis-{installer}-daily-{stream}'
161 project-type: freestyle
168 default: '{installer}'
169 description: "Installer to use."
171 name: BUILD_DIRECTORY
172 default: $WORKSPACE/build_output
173 description: "Directory where the build artifact will be located upon the completion of the build."
176 default: 'artifacts.opnfv.org/genesis/{installer}'
177 description: "URL to Google Storage."
180 default: https://gerrit.opnfv.org/gerrit/genesis
183 default: origin/master
184 description: "Branch to build, deploy and test."
187 default: refs/heads/master
188 description: "Refspec to retrieve."
196 refspec: $GERRIT_REFSPEC
199 - pollscm: '@midnight'
204 artifactDaysToKeep: -1
205 artifactNumToKeep: -1
212 name: 'genesis-{installer}-deploy'
214 project-type: freestyle
221 artifactDaysToKeep: -1
222 artifactNumToKeep: -1
227 default: '{installer}'
228 description: "Installer to use."
231 default: https://gerrit.opnfv.org/gerrit/genesis
232 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
235 default: origin/master
236 description: "Branch to build, deploy and test."
239 default: refs/heads/master
240 description: "Refspec to retrieve."
243 default: 'artifacts.opnfv.org/genesis/fuel'
244 description: "URL to Google Storage."
246 name: BUILD_DIRECTORY
247 default: $WORKSPACE/build_output
248 description: "Directory where the build artifact will be located upon the completion of the build."
256 refspec: $GERRIT_REFSPEC
261 ########################
263 ########################
274 # get the dependencies - temporary fix for RC0
275 [[ -d $WORKSPACE/$INSTALLER/build ]] || mkdir -p $WORKSPACE/$INSTALLER/build
276 cp /home/jenkins/Downloads/opnfv_iso/* $WORKSPACE/$INSTALLER/build/
278 # below lines perhaps need to be enabled in order to fetch images from internet
279 # as we are having disk space issues on ericsson-build slave
280 #wget http://ftp.riken.jp/Linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-Minimal.iso
281 #wget http://download.virtualbox.org/virtualbox/rpm/fedora/20/x86_64/VirtualBox-4.3-4.3.26_98988_fedora18-1.x86_64.rpm
282 #wget http://repos.duss-janser.ch/vagrant/vagrant_1.7.2_x86_64.rpm
285 cd $WORKSPACE/$INSTALLER/ci
286 ./build.sh $BUILD_DIRECTORY
288 # list the build artifacts
289 ls -al $BUILD_DIRECTORY
291 # remove the BUILD_DIRECTORY to reclaim some space
292 /bin/rm -rf $BUILD_DIRECTORY
304 # get the dependencies - temporary fix for RC0
305 [[ -d $WORKSPACE/$INSTALLER/build ]] || mkdir -p $WORKSPACE/$INSTALLER/build
306 cp /home/jenkins/Downloads/opnfv_iso/* $WORKSPACE/$INSTALLER/build/
308 # below lines perhaps need to be enabled in order to fetch images from internet
309 # as we are having disk space issues on ericsson-build slave
310 #wget http://ftp.riken.jp/Linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-Minimal.iso
311 #wget http://download.virtualbox.org/virtualbox/rpm/fedora/20/x86_64/VirtualBox-4.3-4.3.26_98988_fedora18-1.x86_64.rpm
312 #wget http://repos.duss-janser.ch/vagrant/vagrant_1.7.2_x86_64.rpm
315 cd $WORKSPACE/$INSTALLER/ci
316 ./build.sh $BUILD_DIRECTORY
318 # list the build artifacts
319 ls -al $BUILD_DIRECTORY
321 # remove the BUILD_DIRECTORY to reclaim some space
322 /bin/rm -rf $BUILD_DIRECTORY
334 # get the dependencies - temporary fix for RC0
335 [[ -d $WORKSPACE/$INSTALLER/build ]] || mkdir -p $WORKSPACE/$INSTALLER/build
336 cp /home/jenkins/Downloads/opnfv_iso/* $WORKSPACE/$INSTALLER/build/
338 # below lines perhaps need to be enabled in order to fetch images from internet
339 # as we are having disk space issues on ericsson-build slave
340 #wget http://ftp.riken.jp/Linux/centos/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-Minimal.iso
341 #wget http://download.virtualbox.org/virtualbox/rpm/fedora/20/x86_64/VirtualBox-4.3-4.3.26_98988_fedora18-1.x86_64.rpm
342 #wget http://repos.duss-janser.ch/vagrant/vagrant_1.7.2_x86_64.rpm
345 cd $WORKSPACE/$INSTALLER/ci
346 ./build.sh -v $BUILD_ID $BUILD_DIRECTORY
355 # list the build artifacts
356 ls -al $BUILD_DIRECTORY
360 # save information regarding artifact into file
362 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
363 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
364 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$BUILD_ID.iso"
365 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum opnfv-$ARTIFACT_VERSION.iso | cut -d' ' -f1)"
366 echo "OPNFV_BUILD_URL=$BUILD_URL"
367 echo "OPNFV_BUILD=OK"
368 ) > opnfv-$BUILD_ID.properties
370 # copy artifact property file as latest.properties
371 # so we can directly get info regarding latest artifact
372 /bin/cp -f opnfv-$BUILD_ID.properties latest.properties
374 # upload artifact and additional files to google storage
375 gsutil cp OPNFV-CentOS-7-x86_64-$BUILD_ID.iso gs://$GS_URL/opnfv-$BUILD_ID.iso
376 gsutil cp opnfv-$BUILD_ID.properties gs://$GS_URL/opnfv-$BUILD_ID.properties
377 gsutil cp latest.properties gs://$GS_URL/latest.properties
386 # get the latest.properties file in order to get info regarding latest artifact
387 gsutil cp gs://$GS_URL/latest.properties latest.properties
389 # check if we got the file
390 [[ -f latest.properties ]] || exit 1
392 # source the file so we get OPNFV vars
393 source latest.properties
396 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
399 ls -al $WORKSPACE/opnfv.iso
401 # remove the BUILD_DIRECTORY and downlaoded artifact to reclaim some space
402 /bin/rm -rf $BUILD_DIRECTORY
403 /bin/rm -rf $WORKSPACE/opnfv.iso
418 sudo $WORKSPACE/$INSTALLER/ci/clean.sh -base_config $WORKSPACE/$INSTALLER/ci/inventory/lf_pod2_ksgen_settings.yml
420 # and then initiate deployment
421 sudo $WORKSPACE/$INSTALLER/ci/deploy.sh -base_config $WORKSPACE/$INSTALLER/ci/inventory/lf_pod2_ksgen_settings.yml