1 # this is the job configuration for bgs
9 - 'genesis-fuel-verify'
10 - 'genesis-fuel-merge'
11 - 'genesis-fuel-daily-{stream}'
13 # stream: branch with - in place of / (eg. stable-helium)
14 # branch: branch (eg. stable/helium)
21 ########################
23 ########################
26 name: 'genesis-fuel-verify'
28 project-type: freestyle
35 artifactDaysToKeep: -1
41 default: $WORKSPACE/build_output
44 default: https://gerrit.opnfv.org/gerrit/genesis
52 credentials-id: '{ssh-credentials}'
53 refspec: '$GERRIT_REFSPEC'
54 choosing-strategy: 'gerrit'
57 - ssh-agent-credentials:
58 user: '{ssh-credentials}'
63 - patchset-created-event:
64 exclude-drafts: 'false'
65 exclude-trivial-rebase: 'false'
66 exclude-no-code-change: 'false'
67 - draft-published-event
68 - comment-added-contains-event:
69 comment-contains-value: 'recheck'
70 - comment-added-contains-event:
71 comment-contains-value: 'reverify'
73 - project-compare-type: 'ANT'
74 project-pattern: 'genesis'
76 - branch-compare-type: 'ANT'
77 branch-pattern: '**/master'
89 name: 'genesis-fuel-merge'
91 # builder-merge job to run JJB update
93 # This job's purpose is to update all the JJB
95 project-type: freestyle
102 artifactDaysToKeep: -1
107 name: BUILD_DIRECTORY
108 default: $WORKSPACE/build_output
111 default: https://gerrit.opnfv.org/gerrit/genesis
118 - gerrit-trigger-scm:
119 credentials-id: '{ssh-credentials}'
121 choosing-strategy: 'default'
124 - ssh-agent-credentials:
125 user: '{ssh-credentials}'
130 - change-merged-event
131 - comment-added-contains-event:
132 comment-contains-value: 'remerge'
134 - project-compare-type: 'ANT'
135 project-pattern: 'genesis'
137 - branch-compare-type: 'ANT'
138 branch-pattern: '**/master'
149 name: 'genesis-fuel-daily-{stream}'
151 project-type: freestyle
157 name: BUILD_DIRECTORY
158 default: $WORKSPACE/build_output
159 description: "Directory where the build artifact will be located upon the completion of the build."
162 default: 'artifacts.opnfv.org/genesis/fuel'
163 description: "URL to Google Storage."
167 description: "Installer to use."
170 default: https://gerrit.opnfv.org/gerrit/genesis
173 default: origin/master
174 description: "Branch to build, deploy and test."
177 default: refs/heads/master
178 description: "Refspec to retrieve."
186 refspec: $GERRIT_REFSPEC
189 - pollscm: '@midnight'
194 artifactDaysToKeep: -1
195 artifactNumToKeep: -1
198 - 'fuel-daily-master'
211 # set/create the cache location
212 OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
213 [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE
216 cd $WORKSPACE/fuel/ci
217 ./build.sh -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
219 # list the build artifacts
220 ls -al $BUILD_DIRECTORY
222 # remove the BUILD_DIRECTORY to reclaim some space
223 /bin/rm -rf $BUILD_DIRECTORY
235 # set/create the cache location
236 OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
237 [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE
240 cd $WORKSPACE/fuel/ci
241 ./build.sh -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
243 # list the build artifacts
244 ls -al $BUILD_DIRECTORY
246 # remove the BUILD_DIRECTORY to reclaim some space
247 /bin/rm -rf $BUILD_DIRECTORY
250 name: fuel-daily-master
259 # set/create the cache location
260 OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
261 [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE
264 cd $WORKSPACE/fuel/ci
265 ./build.sh -f t -v $BUILD_ID -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
274 # list the build artifacts
275 ls -al $BUILD_DIRECTORY
279 # save information regarding artifact into file
281 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
282 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
283 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$BUILD_ID.iso"
284 echo "OPNFV_BUILD_URL=$BUILD_URL"
285 echo "OPNFV_BUILD=OK"
286 ) > opnfv-$BUILD_ID.properties
288 # copy artifact property file as latest.properties
289 # so we can directly get info regarding latest artifact
290 /bin/cp -f opnfv-$BUILD_ID.properties latest.properties
292 # upload artifact and additional files to google storage
293 gsutil cp opnfv-$BUILD_ID.iso gs://$GS_URL/opnfv-$BUILD_ID.iso
294 gsutil cp opnfv-$BUILD_ID.properties gs://$GS_URL/opnfv-$BUILD_ID.properties
295 gsutil cp latest.properties gs://$GS_URL/latest.properties
304 # get the latest.properties file in order to get info regarding latest artifact
305 gsutil cp gs://$GS_URL/latest.properties latest.properties
307 # check if we got the file
308 [[ -f latest.properties ]] || exit 1
310 # source the file so we get OPNFV vars
311 source latest.properties
314 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
317 ls -al $WORKSPACE/opnfv.iso
319 # remove the BUILD_DIRECTORY and downlaoded artifact to reclaim some space
320 /bin/rm -rf $BUILD_DIRECTORY
321 /bin/rm -rf $WORKSPACE/opnfv.iso