8 - 'compass-verify-{stream}'
9 - 'compass-daily-{stream}'
10 - 'compass-build-iso-{stream}'
11 - 'compass-build-ppa-{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
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: '**/{branch}'
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}'
129 - timed: 'H 16 * * *'
133 - project: 'compass-build-iso-{stream}'
137 - project: 'compass-deploy-virtual-cluster'
141 - project: 'compass-deploy-virtual-cluster-odl'
145 - project: 'compass-deploy-virtual-cluster-onos'
149 - project: 'compass-deploy-bare-huawei-us'
155 name: 'compass-build-iso-{stream}'
171 installer: '{installer}'
175 credentials-id: '{ssh-credentials}'
180 - 'builder-compass-build-iso'
181 - 'builder-compass-upload-artifact'
182 - 'builder-compass-workspace-cleanup'
185 name: 'compass-build-ppa-{stream}'
187 description: "build ppa(using docker) in huawei lab"
203 installer: '{installer}'
207 credentials-id: '{ssh-credentials}'
212 - timed: 'H 16 * * *'
215 - 'builder-compass-make-ppa'
218 name: 'compass-deploy-virtual-{flavor}'
236 installer: '{installer}'
243 - 'builder-compass-ci-preclean-workspace'
244 - 'builder-compass-download-artifact'
245 - 'builder-compass-deploy-virtual-flavor'
248 artifacts: 'ansible.log'
253 name: 'compass-deploy-bare-huawei-us'
257 node: 'huawei-us-deploy-bare-1'
271 installer: '{installer}'
274 - 'builder-compass-ci-preclean-workspace'
275 - 'builder-compass-download-artifact'
276 - 'builder-compass-deploy-bare'
280 artifacts: 'ansible.log'
284 ########################
286 ########################
288 name: compass-parameter
292 default: '{installer}'
293 description: "Installer to use."
295 name: BUILD_DIRECTORY
296 default: $WORKSPACE/build_output
297 description: "Directory where the build artifact will be located upon the completion of the build."
299 name: CACHE_DIRECTORY
300 default: $HOME/opnfv/cache/$PROJECT
301 description: "Directory where the cache to be used during the build is located."
304 default: https://gerrit.opnfv.org/gerrit/$PROJECT
305 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
308 default: artifacts.opnfv.org/$PROJECT/
309 description: "URL to Google Storage."
312 default: build.opnfv.org/artifacts/$PROJECT/
313 description: "URL to Google Storage proxy"
316 default: "192.168.200.2"
319 default: "http://205.177.226.235:9999"
322 default: "$WORKSPACE/work/repo/"
324 name: COMPASS_OPENSTACK_VERSION
329 name: COMPASS_OS_VERSION
334 ########################
336 ########################
338 name: 'builder-compass-make-ppa'
351 for i in $(find *.gz *.iso *.img -type f)
353 md5=$(md5sum $i | cut -d ' ' -f1)
356 curl -T $i.md5 $PPA_REPO
360 name: 'builder-compass-build-iso'
368 # log info to console
369 echo "Starting the build of $INSTALLER. This could take some time..."
370 echo "--------------------------------------------------------"
373 # create the cache directory if it doesn't exist
374 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
375 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
377 # set OPNFV_ARTIFACT_VERSION
378 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
383 cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f
387 ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY
389 # list the build artifacts
390 ls -al $BUILD_DIRECTORY
392 # save information regarding artifact into file
394 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
395 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
396 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
397 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
398 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)"
399 echo "OPNFV_BUILD_URL=$BUILD_URL"
400 ) > $BUILD_DIRECTORY/opnfv.properties
402 echo "--------------------------------------------------------"
406 name: 'builder-compass-deploy-virtual-flavor'
412 # log info to console
413 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
414 echo "--------------------------------------------------------"
417 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
418 sudo brctl addbr vnic_ci
419 sudo ifconfig vnic_ci up
420 export EXTERNAL_NIC=vnic_ci
423 export OS_VERSION=${COMPASS_OS_VERSION}
424 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
425 ./deploy.sh $FLAVOR_CONF
426 if [ $? -ne 0 ]; then
427 echo "depolyment failed!"
432 echo "--------------------------------------------------------"
435 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
436 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
441 name: 'builder-compass-deploy-bare'
447 # log info to console
448 echo "Starting the deployment on baremetal environment using $INSTALLER. This could take some time..."
449 echo "--------------------------------------------------------"
452 export CONFDIR=$WORKSPACE/deploy/conf/hardware_environment/huawei_us_lab/pod1
453 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
454 export EXTERNAL_NIC=eth0
455 export INSTALL_NIC=eth1
459 export OS_VERSION=${COMPASS_OS_VERSION}
460 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
461 ./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml
462 if [ $? -ne 0 ]; then
463 echo "depolyment failed!"
468 echo "--------------------------------------------------------"
471 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
472 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
477 name: 'builder-compass-upload-artifact'
485 # log info to console
486 echo "Uploading the $INSTALLER artifact. This could take some time..."
487 echo "--------------------------------------------------------"
490 # source the opnfv.properties to get ARTIFACT_VERSION
491 source $BUILD_DIRECTORY/opnfv.properties
493 # upload artifact and additional files to google storage
494 gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
495 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
496 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
499 echo "--------------------------------------------------------"
501 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
504 name: 'builder-compass-download-artifact'
512 # log info to console
513 echo "Downloading the $INSTALLER artifact. This could take some time..."
514 echo "--------------------------------------------------------"
517 # get the latest.properties file in order to get info regarding latest artifact
518 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
519 curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
521 # check if we got the file
522 [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
524 # source the file so we get OPNFV vars
525 source $BUILD_DIRECTORY/latest.properties
528 curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
531 ls -al $BUILD_DIRECTORY/compass.iso
534 echo "--------------------------------------------------------"
538 name: 'builder-compass-workspace-cleanup'
546 # delete everything that is in $WORKSPACE
547 /bin/rm -rf $WORKSPACE
550 name: 'builder-compass-ci-preclean-workspace'
559 sudo rm $WORKSPACE -rf
560 git clone $GIT_BASE $WORKSPACE