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}'
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'
150 name: 'compass-build-iso-{stream}'
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-{stream}'
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 name: COMPASS_OPENSTACK_VERSION
324 name: COMPASS_OS_VERSION
329 ########################
331 ########################
333 name: 'builder-compass-make-ppa'
346 for i in $(find *.gz *.iso *.img -type f)
348 md5=$(md5sum $i | cut -d ' ' -f1)
351 curl -T $i.md5 $PPA_REPO
355 name: 'builder-compass-build-iso'
363 # log info to console
364 echo "Starting the build of $INSTALLER. This could take some time..."
365 echo "--------------------------------------------------------"
368 # create the cache directory if it doesn't exist
369 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
370 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
372 # set OPNFV_ARTIFACT_VERSION
373 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
378 cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f
382 ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY
384 # list the build artifacts
385 ls -al $BUILD_DIRECTORY
387 # save information regarding artifact into file
389 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
390 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
391 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
392 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
393 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)"
394 echo "OPNFV_BUILD_URL=$BUILD_URL"
395 ) > $BUILD_DIRECTORY/opnfv.properties
397 echo "--------------------------------------------------------"
401 name: 'builder-compass-deploy-virtual-flavor'
407 # log info to console
408 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
409 echo "--------------------------------------------------------"
412 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
413 sudo brctl addbr vnic_ci
414 sudo ifconfig vnic_ci up
415 export EXTERNAL_NIC=vnic_ci
418 export OS_VERSION=${COMPASS_OS_VERSION}
419 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
420 ./deploy.sh $FLAVOR_CONF
421 if [ $? -ne 0 ]; then
422 echo "depolyment failed!"
427 echo "--------------------------------------------------------"
430 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
431 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
436 name: 'builder-compass-deploy-bare'
442 # log info to console
443 echo "Starting the deployment on baremetal environment using $INSTALLER. This could take some time..."
444 echo "--------------------------------------------------------"
447 export CONFDIR=$WORKSPACE/deploy/conf/hardware_environment/huawei_us_lab/pod1
448 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
449 export EXTERNAL_NIC=eth0
450 export INSTALL_NIC=eth1
454 export OS_VERSION=${COMPASS_OS_VERSION}
455 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
456 ./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml
457 if [ $? -ne 0 ]; then
458 echo "depolyment failed!"
463 echo "--------------------------------------------------------"
466 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
467 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
472 name: 'builder-compass-upload-artifact'
480 # log info to console
481 echo "Uploading the $INSTALLER artifact. This could take some time..."
482 echo "--------------------------------------------------------"
485 # source the opnfv.properties to get ARTIFACT_VERSION
486 source $BUILD_DIRECTORY/opnfv.properties
488 # upload artifact and additional files to google storage
489 gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
490 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
491 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
494 echo "--------------------------------------------------------"
496 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
499 name: 'builder-compass-download-artifact'
507 # log info to console
508 echo "Downloading the $INSTALLER artifact. This could take some time..."
509 echo "--------------------------------------------------------"
512 # get the latest.properties file in order to get info regarding latest artifact
513 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
514 curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
516 # check if we got the file
517 [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
519 # source the file so we get OPNFV vars
520 source $BUILD_DIRECTORY/latest.properties
523 curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
526 ls -al $BUILD_DIRECTORY/compass.iso
529 echo "--------------------------------------------------------"
533 name: 'builder-compass-workspace-cleanup'
541 # delete everything that is in $WORKSPACE
542 /bin/rm -rf $WORKSPACE
545 name: 'builder-compass-ci-preclean-workspace'
554 sudo rm $WORKSPACE -rf
555 git clone $GIT_BASE $WORKSPACE