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: 'artifacts.opnfv.org/genesis/fuel'
189 description: "URL to Google Storage."
191 name: BUILD_DIRECTORY
192 default: $WORKSPACE/build_output
193 description: "Directory where the build artifact will be located upon the completion of the build."
195 name: CACHE_DIRECTORY
196 default: $HOME/opnfv/cache/genesis-fuel
197 description: "Cache location that is where the cache is populated and used during builds to reduce the build time."
199 name: ARTIFACT_VERSION
201 description: "Version number to append to resulting ISO."
209 refspec: $GERRIT_REFSPEC
212 - pollscm: '@midnight'
217 artifactDaysToKeep: -1
218 artifactNumToKeep: -1
222 - 'installer-upload-artifact'
223 - 'installer-download-artifact'
226 - 'installer-cleanup'
230 name: installer-build
239 # set/create the cache location
240 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
243 cd $WORKSPACE/fuel/ci
244 ./build.sh -v $ARTIFACT_VERSION -c file://$CACHE_DIRECTORY $BUILD_DIRECTORY
246 # list the build artifacts
247 ls -al $BUILD_DIRECTORY
250 name: installer-deploy
259 # we should have the artifact itself downloaded by now
260 # look if it is there
261 if [ -f $WORKSPACE/opnfv.iso ]; then
262 echo "Artifact fetched!"
263 ls -al $WORKSPACE/opnfv.iso
265 echo "Artifact does not exist!"
269 # we should have the artifact properties file downloaded by now
270 # look if it is there
271 if [ -f $WORKSPACE/latest.properties ]; then
272 echo "Artifact properties file fetched!"
273 ls -al $WORKSPACE/latest.properties
275 echo "Artifact properties file does not exist!"
279 # source the file so we get OPNFV vars
280 source $WORKSPACE/latest.properties
283 echo "Proceeding with deployment using ISO downloaded from below URL"
284 echo "$OPNFV_ARTIFACT_URL"
285 echo "This artifact was built using $OPNFV_GIT_SHA1 version of repo $OPNFV_GIT_URL"
288 echo "Here is where we are supposed to issue deploy.sh"
301 echo "Here is where we are supposed to run FuncTest"
304 name: installer-upload-artifact
313 # change the build directory where ISO is created
316 # save information regarding artifact into file
318 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
319 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
320 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$ARTIFACT_VERSION.iso"
321 echo "OPNFV_BUILD_URL=$BUILD_URL"
322 echo "OPNFV_BUILD=OK"
323 ) > opnfv-$ARTIFACT_VERSION.properties
325 # copy artifact property file as latest.properties
326 # so we can directly get info regarding latest artifact
327 /bin/cp -f opnfv-$ARTIFACT_VERSION.properties latest.properties
329 # upload artifact and additional files to google storage
330 gsutil cp opnfv-$ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$ARTIFACT_VERSION.iso
331 gsutil cp opnfv-$ARTIFACT_VERSION.properties gs://$GS_URL/opnfv-$ARTIFACT_VERSION.properties
332 gsutil cp latest.properties gs://$GS_URL/latest.properties
335 name: installer-download-artifact
344 # get the latest.properties file in order to get info regarding latest artifact
345 gsutil cp gs://$GS_URL/latest.properties $WORKSPACE/latest.properties
347 # check if we got the file
348 [[ -f latest.properties ]] || exit 1
350 # source the file so we get OPNFV vars
351 source latest.properties
354 gsutil cp gs://$OPNFV_ARTIFACT_URL $WORKSPACE/opnfv.iso
357 ls -al $WORKSPACE/opnfv.iso
360 name: installer-cleanup
369 # delete everything that is in $WORKSPACE
370 /bin/rm -rf $WORKSPACE