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
42 artifactDaysToKeep: -1
48 default: https://gerrit.opnfv.org/gerrit/genesis
49 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
52 default: 'artifacts.opnfv.org/genesis/fuel'
53 description: "URL to Google Storage."
56 default: $WORKSPACE/build_output
57 description: "Directory where the build artifact will be located upon the completion of the build."
60 default: $HOME/opnfv/cache/genesis-fuel
61 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
63 name: ARTIFACT_VERSION
65 description: "Version number to append to resulting ISO."
71 credentials-id: '{ssh-credentials}'
72 refspec: '$GERRIT_REFSPEC'
73 choosing-strategy: 'gerrit'
76 - ssh-agent-credentials:
77 user: '{ssh-credentials}'
82 - patchset-created-event:
83 exclude-drafts: 'false'
84 exclude-trivial-rebase: 'false'
85 exclude-no-code-change: 'false'
86 - draft-published-event
87 - comment-added-contains-event:
88 comment-contains-value: 'recheck'
89 - comment-added-contains-event:
90 comment-contains-value: 'reverify'
92 - project-compare-type: 'ANT'
93 project-pattern: 'genesis'
95 - branch-compare-type: 'ANT'
96 branch-pattern: '**/master'
106 - 'installer-cleanup'
109 name: 'genesis-fuel-merge'
111 # builder-merge job to run JJB update
113 # This job's purpose is to update all the JJB
115 project-type: freestyle
129 artifactDaysToKeep: -1
135 default: https://gerrit.opnfv.org/gerrit/genesis
136 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
139 default: 'artifacts.opnfv.org/genesis/fuel'
140 description: "URL to Google Storage."
142 name: BUILD_DIRECTORY
143 default: $WORKSPACE/build_output
144 description: "Directory where the build artifact will be located upon the completion of the build."
146 name: CACHE_DIRECTORY
147 default: $HOME/opnfv/cache/genesis-fuel
148 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
150 name: ARTIFACT_VERSION
152 description: "Version number to append to resulting ISO."
157 - gerrit-trigger-scm:
158 credentials-id: '{ssh-credentials}'
160 choosing-strategy: 'default'
163 - ssh-agent-credentials:
164 user: '{ssh-credentials}'
169 - change-merged-event
170 - comment-added-contains-event:
171 comment-contains-value: 'remerge'
173 - project-compare-type: 'ANT'
174 project-pattern: 'genesis'
176 - branch-compare-type: 'ANT'
177 branch-pattern: '**/master'
186 - 'installer-cleanup'
189 name: 'genesis-fuel-daily-{stream}'
191 project-type: freestyle
198 default: https://gerrit.opnfv.org/gerrit/genesis
199 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
202 default: origin/master
203 description: "Branch to build, deploy and test."
206 default: refs/heads/master
207 description: "Refspec to retrieve."
210 default: 'artifacts.opnfv.org/genesis/fuel'
211 description: "URL to Google Storage."
213 name: BUILD_DIRECTORY
214 default: $WORKSPACE/build_output
215 description: "Directory where the build artifact will be located upon the completion of the build."
217 name: CACHE_DIRECTORY
218 default: $HOME/opnfv/cache/genesis-fuel
219 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
221 name: ARTIFACT_VERSION
223 description: "Version number to append to resulting ISO."
227 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
235 refspec: $GERRIT_REFSPEC
238 - pollscm: '@midnight'
243 artifactDaysToKeep: -1
244 artifactNumToKeep: -1
248 - 'installer-upload-artifact'
249 - 'installer-deploy-quick-fix'
252 name: installer-build
261 # this is here for quick tries with deployment
262 SKIP_BUILD=${SKIP_BUILD-0}
263 if [ "$SKIP_BUILD" == "1" ]; then
264 echo "Skipping build for deployment testing!"
267 echo "Proceeding with build first!"
270 # set/create the cache location
271 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
274 cd $WORKSPACE/fuel/ci
275 ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
277 # list the build artifacts
278 ls -al $BUILD_DIRECTORY
281 name: installer-deploy-quick-fix
290 # this is just a quick fix to execute the deployment in a messy way
291 # will be fixed later on
292 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
305 echo "Here is where we are supposed to run FuncTest"
308 name: installer-upload-artifact
317 # change the build directory where ISO is created
320 # save information regarding artifact into file
322 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
323 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
324 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$ARTIFACT_VERSION.iso"
325 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum opnfv-$ARTIFACT_VERSION.iso | cut -d' ' -f1)"
326 echo "OPNFV_BUILD_URL=$BUILD_URL"
327 echo "OPNFV_BUILD=OK"
328 ) > opnfv-$ARTIFACT_VERSION.properties
330 # copy artifact property file as latest.properties
331 # so we can directly get info regarding latest artifact
332 /bin/cp -f opnfv-$ARTIFACT_VERSION.properties latest.properties
334 # upload artifact and additional files to google storage
335 gsutil cp opnfv-$ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$ARTIFACT_VERSION.iso
336 gsutil cp opnfv-$ARTIFACT_VERSION.properties gs://$GS_URL/opnfv-$ARTIFACT_VERSION.properties
337 gsutil cp latest.properties gs://$GS_URL/latest.properties
340 name: installer-download-artifact
349 # get the latest.properties file in order to get info regarding latest artifact
350 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
352 # check if we got the file
353 [[ -f latest.properties ]] || exit 1
355 # source the file so we get OPNFV vars
356 source latest.properties
359 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
362 ls -al $WORKSPACE/opnfv.iso
365 name: installer-cleanup
374 # delete everything that is in $WORKSPACE
375 /bin/rm -rf $WORKSPACE