1 # this is the job configuration for bgs
9 - 'genesis-compass-verify'
10 - 'genesis-compass-merge'
11 - 'genesis-compass-daily-{stream}'
12 - 'genesis-compass-deploy-virtual-{flavor}'
14 # stream: branch with - in place of / (eg. stable-helium)
15 # branch: branch (eg. stable/helium)
23 node: 'compass-build-deploy-02'
26 node: 'compass-build-deploy-03'
32 ########################
34 ########################
37 name: 'genesis-compass-verify'
39 project-type: freestyle
43 node: compass-build-deploy-03
48 artifactDaysToKeep: -1
57 installer: '{installer}'
61 credentials-id: '{ssh-credentials}'
62 refspec: '$GERRIT_REFSPEC'
63 choosing-strategy: 'gerrit'
66 - ssh-agent-credentials:
67 user: '{ssh-credentials}'
72 - patchset-created-event:
73 exclude-drafts: 'false'
74 exclude-trivial-rebase: 'false'
75 exclude-no-code-change: 'false'
76 - draft-published-event
77 - comment-added-contains-event:
78 comment-contains-value: 'recheck'
79 - comment-added-contains-event:
80 comment-contains-value: 'reverify'
82 - project-compare-type: 'ANT'
83 project-pattern: 'genesis'
85 - branch-compare-type: 'ANT'
86 branch-pattern: '**/master'
96 #- 'compass-workspace-cleanup'
99 name: 'genesis-compass-merge'
101 # builder-merge job to run JJB update
103 # This job's purpose is to update all the JJB
105 project-type: freestyle
107 node: compass-build-deploy-03
112 artifactDaysToKeep: -1
121 installer: '{installer}'
123 - gerrit-trigger-scm:
124 credentials-id: '{ssh-credentials}'
126 choosing-strategy: 'default'
129 - ssh-agent-credentials:
130 user: '{ssh-credentials}'
135 - change-merged-event
136 - comment-added-contains-event:
137 comment-contains-value: 'remerge'
139 - project-compare-type: 'ANT'
140 project-pattern: 'genesis'
142 - branch-compare-type: 'ANT'
143 branch-pattern: '**/master'
148 pattern: 'compass/**'
154 name: 'genesis-compass-daily-{stream}'
156 project-type: freestyle
158 node: compass-build-deploy-03
164 installer: '{installer}'
168 credentials-id: '{ssh-credentials}'
173 - pollscm: '@midnight'
178 artifactDaysToKeep: -1
179 artifactNumToKeep: -1
183 #- 'compass-upload-artifact'
184 #- 'compass-workspace-cleanup'
187 echo "genesis-compass-deploy-virtual job will be triggered!"
191 project: 'genesis-compass-deploy-virtual-five'
194 project: 'genesis-compass-deploy-virtual-cluster'
199 name: 'genesis-compass-deploy-virtual-{flavor}'
201 project-type: freestyle
211 installer: '{installer}'
218 - pollscm: "H/2 * * * *"
223 artifactDaysToKeep: -1
224 artifactNumToKeep: -1
227 - 'compass-ci-preclean-workspace'
228 - 'compass-deploy-virtual-flavor'
230 ########################
232 ########################
234 name: compass-parameter
238 default: '{installer}'
239 description: "Installer to use."
241 name: BUILD_DIRECTORY
242 default: $WORKSPACE/build_output
243 description: "Directory where the build artifact will be located upon the completion of the build."
245 name: CACHE_DIRECTORY
246 default: $HOME/opnfv/cache/genesis-$INSTALLER
247 description: "Directory where the cache to be used during the build is located."
250 default: https://gerrit.opnfv.org/gerrit/$PROJECT
251 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
254 default: artifacts.opnfv.org/$PROJECT/$INSTALLER
255 description: "URL to Google Storage."
258 default: "root@192.168.121.12:~/kun/artifacts"
259 description: "Artifact Repository"
260 ########################
262 ########################
274 name: 'compass-build'
282 # log info to console
286 name: 'compass-deploy'
294 # log info to console
298 name: 'compass-deploy-virtual-flavor'
306 # log info to console
307 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
308 echo "--------------------------------------------------------"
311 cd $WORKSPACE/compass
312 ./ci/deploy.sh $FLAVOR_CONF
313 # ssh -o BatchMode=yes -o TCPKeepAlive=yes cideploy@10.118.34.205 ./cideploy.sh
316 echo "--------------------------------------------------------"
320 name: 'compass-upload-artifact'
328 # log info to console
329 echo "Uploading the $INSTALLER artifact. This could take some time..."
330 echo "--------------------------------------------------------"
333 # source the opnfv.properties to get ARTIFACT_VERSION
334 source $WORKSPACE/opnfv.properties
336 # upload artifact and additional files to google storage
337 gsutil cp $BUILD_DIRECTORY/opnfv-$OPNFV_ARTIFACT_VERSION.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
338 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
339 gsutil cp $WORKSPACE/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
342 echo "--------------------------------------------------------"
346 name: 'compass-download-artifact'
354 # log info to console
355 echo "Downloading the $INSTALLER artifact. This could take some time..."
356 echo "--------------------------------------------------------"
359 # get the latest.properties file in order to get info regarding latest artifact
360 curl -s -o $WORKSPACE/latest.properties http://$GS_URL/latest.properties
362 # check if we got the file
363 [[ -f latest.properties ]] || exit 1
365 # source the file so we get OPNFV vars
366 source latest.properties
369 curl -s -o $WORKSPACE/opnfv.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
372 ls -al $WORKSPACE/opnfv.iso
375 echo "--------------------------------------------------------"
379 name: 'compass-workspace-cleanup'
387 # delete everything that is in $WORKSPACE
388 /bin/rm -rf $WORKSPACE
391 name: 'compass-ci-preclean-workspace'
400 sudo rm $WORKSPACE -rf
401 git clone $GIT_BASE $WORKSPACE