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."
213 description: "Temporary parameter for deployment testing to skip the build and run deployment only."
221 refspec: $GERRIT_REFSPEC
224 - pollscm: '@midnight'
229 artifactDaysToKeep: -1
230 artifactNumToKeep: -1
234 - 'installer-deploy-quick-fix'
237 name: installer-build
246 # this is here for quick tries with deployment
247 SKIP_BUILD=${SKIP_BUILD-0}
248 if [ "$SKIP_BUILD" == "1" ]; then
249 echo "Skipping build for deployment testing!"
252 echo "Proceeding with build first!"
255 # set/create the cache location
256 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
259 cd $WORKSPACE/fuel/ci
260 ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
262 # list the build artifacts
263 ls -al $BUILD_DIRECTORY
266 name: installer-deploy-quick-fix
275 # this is just a quick fix to execute the deployment in a messy way
276 # will be fixed later on
277 ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
290 echo "Here is where we are supposed to run FuncTest"
293 name: installer-upload-artifact
302 # change the build directory where ISO is created
305 # save information regarding artifact into file
307 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
308 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
309 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$ARTIFACT_VERSION.iso"
310 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum opnfv-$ARTIFACT_VERSION.iso | cut -d' ' -f1)"
311 echo "OPNFV_BUILD_URL=$BUILD_URL"
312 echo "OPNFV_BUILD=OK"
313 ) > opnfv-$ARTIFACT_VERSION.properties
315 # copy artifact property file as latest.properties
316 # so we can directly get info regarding latest artifact
317 /bin/cp -f opnfv-$ARTIFACT_VERSION.properties latest.properties
319 # upload artifact and additional files to google storage
320 gsutil cp opnfv-$ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$ARTIFACT_VERSION.iso
321 gsutil cp opnfv-$ARTIFACT_VERSION.properties gs://$GS_URL/opnfv-$ARTIFACT_VERSION.properties
322 gsutil cp latest.properties gs://$GS_URL/latest.properties
325 name: installer-download-artifact
334 # get the latest.properties file in order to get info regarding latest artifact
335 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
337 # check if we got the file
338 [[ -f latest.properties ]] || exit 1
340 # source the file so we get OPNFV vars
341 source latest.properties
344 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
347 ls -al $WORKSPACE/opnfv.iso
350 name: installer-cleanup
359 # delete everything that is in $WORKSPACE
360 /bin/rm -rf $WORKSPACE