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: https://gerrit.opnfv.org/gerrit/genesis
42 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
45 default: 'artifacts.opnfv.org/genesis/fuel'
46 description: "URL to Google Storage."
49 default: $WORKSPACE/build_output
50 description: "Directory where the build artifact will be located upon the completion of the build."
53 default: $HOME/opnfv/cache/genesis-fuel
54 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
56 name: ARTIFACT_VERSION
58 description: "Version number to append to resulting ISO."
64 credentials-id: '{ssh-credentials}'
65 refspec: '$GERRIT_REFSPEC'
66 choosing-strategy: 'gerrit'
69 - ssh-agent-credentials:
70 user: '{ssh-credentials}'
75 - patchset-created-event:
76 exclude-drafts: 'false'
77 exclude-trivial-rebase: 'false'
78 exclude-no-code-change: 'false'
79 - draft-published-event
80 - comment-added-contains-event:
81 comment-contains-value: 'recheck'
82 - comment-added-contains-event:
83 comment-contains-value: 'reverify'
85 - project-compare-type: 'ANT'
86 project-pattern: 'genesis'
88 - branch-compare-type: 'ANT'
89 branch-pattern: '**/master'
102 name: 'genesis-fuel-merge'
104 # builder-merge job to run JJB update
106 # This job's purpose is to update all the JJB
108 project-type: freestyle
115 artifactDaysToKeep: -1
121 default: https://gerrit.opnfv.org/gerrit/genesis
122 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
125 default: 'artifacts.opnfv.org/genesis/fuel'
126 description: "URL to Google Storage."
128 name: BUILD_DIRECTORY
129 default: $WORKSPACE/build_output
130 description: "Directory where the build artifact will be located upon the completion of the build."
132 name: CACHE_DIRECTORY
133 default: $HOME/opnfv/cache/genesis-fuel
134 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
136 name: ARTIFACT_VERSION
138 description: "Version number to append to resulting ISO."
143 - gerrit-trigger-scm:
144 credentials-id: '{ssh-credentials}'
146 choosing-strategy: 'default'
149 - ssh-agent-credentials:
150 user: '{ssh-credentials}'
155 - change-merged-event
156 - comment-added-contains-event:
157 comment-contains-value: 'remerge'
159 - project-compare-type: 'ANT'
160 project-pattern: 'genesis'
162 - branch-compare-type: 'ANT'
163 branch-pattern: '**/master'
172 - 'installer-cleanup'
175 name: 'genesis-fuel-daily-{stream}'
177 project-type: freestyle
184 default: https://gerrit.opnfv.org/gerrit/genesis
185 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
188 default: origin/master
189 description: "Branch to build, deploy and test."
192 default: refs/heads/master
193 description: "Refspec to retrieve."
196 default: 'artifacts.opnfv.org/genesis/fuel'
197 description: "URL to Google Storage."
199 name: BUILD_DIRECTORY
200 default: $WORKSPACE/build_output
201 description: "Directory where the build artifact will be located upon the completion of the build."
203 name: CACHE_DIRECTORY
204 default: $HOME/opnfv/cache/genesis-fuel
205 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
207 name: ARTIFACT_VERSION
209 description: "Version number to append to resulting ISO."
217 refspec: $GERRIT_REFSPEC
220 - pollscm: '@midnight'
225 artifactDaysToKeep: -1
226 artifactNumToKeep: -1
230 - 'installer-upload-artifact'
231 - 'installer-download-artifact'
234 - 'installer-cleanup'
238 name: installer-build
247 # set/create the cache location
248 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
251 cd $WORKSPACE/fuel/ci
252 ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
254 # list the build artifacts
255 ls -al $BUILD_DIRECTORY
258 name: installer-deploy
267 # we should have the artifact itself downloaded by now
268 # look if it is there
269 if [ -f $WORKSPACE/opnfv.iso ]; then
270 echo "Artifact fetched!"
271 ls -al $WORKSPACE/opnfv.iso
273 echo "Artifact does not exist!"
277 # we should have the artifact properties file downloaded by now
278 # look if it is there
279 if [ -f $WORKSPACE/latest.properties ]; then
280 echo "Artifact properties file fetched!"
281 ls -al $WORKSPACE/latest.properties
283 echo "Artifact properties file does not exist!"
287 # source the file so we get OPNFV vars
288 source $WORKSPACE/latest.properties
291 echo "Proceeding with deployment using ISO downloaded from below URL"
292 echo "$OPNFV_ARTIFACT_URL"
293 echo "This artifact was built using $OPNFV_GIT_SHA1 version of repo $OPNFV_GIT_URL"
296 echo "Here is where we are supposed to issue deploy.sh"
309 echo "Here is where we are supposed to run FuncTest"
312 name: installer-upload-artifact
321 # change the build directory where ISO is created
324 # save information regarding artifact into file
326 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
327 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
328 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$ARTIFACT_VERSION.iso"
329 echo "OPNFV_BUILD_URL=$BUILD_URL"
330 echo "OPNFV_BUILD=OK"
331 ) > opnfv-$ARTIFACT_VERSION.properties
333 # copy artifact property file as latest.properties
334 # so we can directly get info regarding latest artifact
335 /bin/cp -f opnfv-$ARTIFACT_VERSION.properties latest.properties
337 # upload artifact and additional files to google storage
338 gsutil cp opnfv-$ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$ARTIFACT_VERSION.iso
339 gsutil cp opnfv-$ARTIFACT_VERSION.properties gs://$GS_URL/opnfv-$ARTIFACT_VERSION.properties
340 gsutil cp latest.properties gs://$GS_URL/latest.properties
343 name: installer-download-artifact
352 # get the latest.properties file in order to get info regarding latest artifact
353 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
355 # check if we got the file
356 [[ -f latest.properties ]] || exit 1
358 # source the file so we get OPNFV vars
359 source latest.properties
362 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
365 ls -al $WORKSPACE/opnfv.iso
368 name: installer-cleanup
377 # delete everything that is in $WORKSPACE
378 /bin/rm -rf $WORKSPACE