8 - 'compass-verify-{stream}'
9 - 'compass-daily-{stream}'
12 - 'compass-deploy-virtual-{flavor}'
13 - 'compass-deploy-bare-huawei-us'
15 # only master branch is enabled at the moment to keep no of jobs sane
20 # - stable-brahmaputra:
21 # branch: 'stable/brahmaputra'
22 # gs-pathname: '/brahmaputra'
26 conf: 'virtual_cluster_odl'
27 node: 'huawei-deploy-vm'
29 conf: 'virtual_cluster_onos'
30 node: 'huawei-deploy-vm'
32 conf: 'virtual_cluster'
33 node: 'huawei-deploy-vm'
35 project: 'compass4nfv'
37 ########################
39 ########################
41 name: 'compass-verify-{stream}'
45 node: 'huawei-deploy-vm'
61 installer: '{installer}'
64 default: 'virtual_cluster'
68 credentials-id: '{ssh-credentials}'
69 refspec: '$GERRIT_REFSPEC'
70 choosing-strategy: 'gerrit'
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: '{project}'
88 - branch-compare-type: 'ANT'
89 branch-pattern: '**/master'
92 pattern: 'docs/**|.gitignore'
95 - 'builder-compass-build-iso'
96 - 'builder-compass-deploy-virtual-flavor'
99 artifacts: 'ansible.log'
104 name: 'compass-daily-{stream}'
120 installer: '{installer}'
124 credentials-id: '{ssh-credentials}'
133 - project: 'compass-build-iso'
137 - project: 'compass-deploy-virtual-cluster'
141 # - project: 'compass-deploy-virtual-cluster-odl'
145 - project: 'compass-deploy-virtual-cluster-onos'
150 name: 'compass-build-iso'
166 installer: '{installer}'
170 credentials-id: '{ssh-credentials}'
175 - 'builder-compass-build-iso'
176 - 'builder-compass-upload-artifact'
177 - 'builder-compass-workspace-cleanup'
180 name: 'compass-build-ppa'
182 description: "build ppa(using docker) in huawei lab"
198 installer: '{installer}'
202 credentials-id: '{ssh-credentials}'
207 - timed: 'H 16 * * *'
210 - 'builder-compass-make-ppa'
213 name: 'compass-deploy-virtual-{flavor}'
231 installer: '{installer}'
238 - 'builder-compass-ci-preclean-workspace'
239 - 'builder-compass-download-artifact'
240 - 'builder-compass-deploy-virtual-flavor'
243 artifacts: 'ansible.log'
248 name: 'compass-deploy-bare-huawei-us'
252 node: 'huawei-us-deploy-bare-1'
266 installer: '{installer}'
269 - 'builder-compass-ci-preclean-workspace'
270 - 'builder-compass-download-artifact'
271 - 'builder-compass-deploy-bare'
275 artifacts: 'ansible.log'
279 ########################
281 ########################
283 name: compass-parameter
287 default: '{installer}'
288 description: "Installer to use."
290 name: BUILD_DIRECTORY
291 default: $WORKSPACE/build_output
292 description: "Directory where the build artifact will be located upon the completion of the build."
294 name: CACHE_DIRECTORY
295 default: $HOME/opnfv/cache/$PROJECT
296 description: "Directory where the cache to be used during the build is located."
299 default: https://gerrit.opnfv.org/gerrit/$PROJECT
300 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
303 default: artifacts.opnfv.org/$PROJECT/
304 description: "URL to Google Storage."
307 default: build.opnfv.org/artifacts/$PROJECT/
308 description: "URL to Google Storage proxy"
311 default: "192.168.200.2"
314 default: "http://205.177.226.235:9999"
317 default: "$WORKSPACE/work/repo/"
319 ########################
321 ########################
323 name: 'builder-compass-make-ppa'
336 for i in $(find *.gz *.iso *.img -type f)
338 md5=$(md5sum $i | cut -d ' ' -f1)
341 curl -T $i.md5 $PPA_REPO
345 name: 'builder-compass-build-iso'
353 # log info to console
354 echo "Starting the build of $INSTALLER. This could take some time..."
355 echo "--------------------------------------------------------"
358 # create the cache directory if it doesn't exist
359 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
360 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
362 # set OPNFV_ARTIFACT_VERSION
363 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
368 cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f
372 ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY
374 # list the build artifacts
375 ls -al $BUILD_DIRECTORY
377 # save information regarding artifact into file
379 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
380 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
381 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
382 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
383 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)"
384 echo "OPNFV_BUILD_URL=$BUILD_URL"
385 ) > $BUILD_DIRECTORY/opnfv.properties
387 echo "--------------------------------------------------------"
391 name: 'builder-compass-deploy-virtual-flavor'
397 # log info to console
398 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
399 echo "--------------------------------------------------------"
402 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
405 export EXTERNAL_NIC=vnic_ci
408 ./deploy.sh $FLAVOR_CONF
409 if [ $? -ne 0 ]; then
410 echo "depolyment failed!"
415 echo "--------------------------------------------------------"
418 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
419 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_juno-opnfv2/ansible.log ./ &> /dev/null
424 name: 'builder-compass-deploy-bare'
430 # log info to console
431 echo "Starting the deployment on baremetal environment using $INSTALLER. This could take some time..."
432 echo "--------------------------------------------------------"
435 export CONFDIR=$WORKSPACE/deploy/conf/hardware_environment/huawei_us_lab/pod1
436 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
437 export EXTERNAL_NIC=eth0
438 export INSTALL_NIC=eth1
442 ./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml
443 if [ $? -ne 0 ]; then
444 echo "depolyment failed!"
449 echo "--------------------------------------------------------"
452 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
453 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_juno-opnfv2/ansible.log ./ &> /dev/null
458 name: 'builder-compass-upload-artifact'
466 # log info to console
467 echo "Uploading the $INSTALLER artifact. This could take some time..."
468 echo "--------------------------------------------------------"
471 # source the opnfv.properties to get ARTIFACT_VERSION
472 source $BUILD_DIRECTORY/opnfv.properties
474 # upload artifact and additional files to google storage
475 gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
476 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
477 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
480 echo "--------------------------------------------------------"
482 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
485 name: 'builder-compass-download-artifact'
493 # log info to console
494 echo "Downloading the $INSTALLER artifact. This could take some time..."
495 echo "--------------------------------------------------------"
498 # get the latest.properties file in order to get info regarding latest artifact
499 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
500 curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
502 # check if we got the file
503 [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
505 # source the file so we get OPNFV vars
506 source $BUILD_DIRECTORY/latest.properties
509 curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
512 ls -al $BUILD_DIRECTORY/compass.iso
515 echo "--------------------------------------------------------"
519 name: 'builder-compass-workspace-cleanup'
527 # delete everything that is in $WORKSPACE
528 /bin/rm -rf $WORKSPACE
531 name: 'builder-compass-ci-preclean-workspace'
540 sudo rm $WORKSPACE -rf
541 git clone $GIT_BASE $WORKSPACE