8 - 'compass-verify-{stream}'
9 - 'compass-daily-{stream}'
10 - 'compass-build-iso-{stream}'
11 - 'compass-build-ppa-{stream}'
12 - 'compass-deploy-virtual-{sdn-controller}-{stream}'
13 - 'compass-deploy-bare-huawei-us-{stream}'
15 # only master branch is enabled at the moment to keep no of jobs sane
21 # branch: 'stable/{stream}'
22 # gs-pathname: '/{stream}'
27 node: huawei-deploy-vm
30 node: huawei-deploy-vm
33 node: huawei-deploy-vm
36 node: huawei-deploy-vm
38 project: 'compass4nfv'
40 ########################
42 ########################
44 name: 'compass-verify-{stream}'
48 node: 'huawei-deploy-vm'
64 installer: '{installer}'
65 gs-pathname: '{gs-pathname}'
68 default: '{sdn-controller}'
71 credentials-id: '{ssh-credentials}'
72 refspec: '$GERRIT_REFSPEC'
73 choosing-strategy: 'gerrit'
78 - patchset-created-event:
79 exclude-drafts: 'false'
80 exclude-trivial-rebase: 'false'
81 exclude-no-code-change: 'false'
82 - draft-published-event
83 - comment-added-contains-event:
84 comment-contains-value: 'recheck'
85 - comment-added-contains-event:
86 comment-contains-value: 'reverify'
88 - project-compare-type: 'ANT'
89 project-pattern: '{project}'
91 - branch-compare-type: 'ANT'
92 branch-pattern: '**/{branch}'
95 pattern: 'docs/**|.gitignore'
98 - 'builder-compass-build-iso'
99 - 'builder-compass-deploy-virtual'
102 artifacts: 'ansible.log'
107 name: 'compass-daily-{stream}'
123 installer: '{installer}'
124 gs-pathname: '{gs-pathname}'
128 credentials-id: '{ssh-credentials}'
133 - timed: 'H 16 * * *'
137 - project: 'compass-build-iso-{stream}'
141 - project: 'compass-deploy-virtual-cluster-nosnd-{stream}'
145 - project: 'compass-deploy-virtual-cluster-odl-{stream}'
149 - project: 'compass-deploy-virtual-cluster-onos-{stream}'
153 - project: 'compass-deploy-bare-huawei-us-{stream}'
159 name: 'compass-build-iso-{stream}'
175 installer: '{installer}'
176 gs-pathname: '{gs-pathname}'
180 credentials-id: '{ssh-credentials}'
185 - 'builder-compass-build-iso'
186 - 'builder-compass-upload-artifact'
187 - 'builder-compass-workspace-cleanup'
190 name: 'compass-build-ppa-{stream}'
192 description: "build ppa(using docker) in huawei lab"
208 installer: '{installer}'
209 gs-pathname: '{gs-pathname}'
213 credentials-id: '{ssh-credentials}'
218 - timed: 'H 16 * * *'
221 - 'builder-compass-make-ppa'
224 name: 'compass-deploy-virtual-{sdn-controller}-{stream}'
242 installer: '{installer}'
243 gs-pathname: '{gs-pathname}'
246 default: '{sdn-controller}'
249 - 'builder-compass-ci-preclean-workspace'
250 - 'builder-compass-download-artifact'
251 - 'builder-compass-deploy-virtual'
254 artifacts: 'ansible.log'
259 name: 'compass-deploy-bare-huawei-us-{stream}'
263 node: 'huawei-us-deploy-bare-1'
277 installer: '{installer}'
278 gs-pathname: '{gs-pathname}'
281 default: '{sdn-controller}'
284 - 'builder-compass-ci-preclean-workspace'
285 - 'builder-compass-download-artifact'
286 - 'builder-compass-deploy-bare'
290 artifacts: 'ansible.log'
294 ########################
296 ########################
298 name: compass-parameter
302 default: '{installer}'
303 description: "Installer to use."
305 name: BUILD_DIRECTORY
306 default: $WORKSPACE/build_output
307 description: "Directory where the build artifact will be located upon the completion of the build."
309 name: CACHE_DIRECTORY
310 default: $HOME/opnfv/cache/$PROJECT
311 description: "Directory where the cache to be used during the build is located."
314 default: https://gerrit.opnfv.org/gerrit/$PROJECT
315 description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
318 default: artifacts.opnfv.org/$PROJECT{gs-pathname}
319 description: "URL to Google Storage."
322 default: build.opnfv.org/artifacts/$PROJECT/
323 description: "URL to Google Storage proxy"
326 default: "192.168.200.2"
329 default: "http://205.177.226.235:9999"
332 default: "$WORKSPACE/work/repo/"
334 name: COMPASS_OPENSTACK_VERSION
339 name: COMPASS_OS_VERSION
344 ########################
346 ########################
348 name: 'builder-compass-make-ppa'
361 for i in $(find *.gz *.iso *.img -type f)
363 md5=$(md5sum $i | cut -d ' ' -f1)
366 curl -T $i.md5 $PPA_REPO
370 name: 'builder-compass-build-iso'
378 # log info to console
379 echo "Starting the build of $INSTALLER. This could take some time..."
380 echo "--------------------------------------------------------"
383 # create the cache directory if it doesn't exist
384 [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
385 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
387 # set OPNFV_ARTIFACT_VERSION
388 export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
393 cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f
397 ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY
399 # list the build artifacts
400 ls -al $BUILD_DIRECTORY
402 # save information regarding artifact into file
404 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
405 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
406 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
407 echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
408 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)"
409 echo "OPNFV_BUILD_URL=$BUILD_URL"
410 ) > $BUILD_DIRECTORY/opnfv.properties
412 echo "--------------------------------------------------------"
416 name: 'builder-compass-deploy-virtual'
422 # log info to console
423 echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
424 echo "--------------------------------------------------------"
427 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
428 export OS_VERSION=${COMPASS_OS_VERSION}
429 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
430 export CONFDIR=$WORKSPACE/deploy/conf/vm_environment
431 ./deploy.sh --dha $CONFDIR/$SDN_CONTROLLER.yml --network $CONFDIR/$NODE_NAME/network.yml
432 if [ $? -ne 0 ]; then
433 echo "depolyment failed!"
438 echo "--------------------------------------------------------"
441 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
442 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
447 name: 'builder-compass-deploy-bare'
453 # log info to console
454 echo "Starting the deployment on baremetal environment using $INSTALLER. This could take some time..."
455 echo "--------------------------------------------------------"
458 export CONFDIR=$WORKSPACE/deploy/conf/hardware_environment/huawei_us_lab/pod1
459 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
460 export EXTERNAL_NIC=eth0
461 export INSTALL_NIC=eth1
465 export OS_VERSION=${COMPASS_OS_VERSION}
466 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
467 ./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml
468 if [ $? -ne 0 ]; then
469 echo "depolyment failed!"
474 echo "--------------------------------------------------------"
477 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
478 sshpass -p root scp 2>/dev/null $ssh_options root@${installer_ip}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
483 name: 'builder-compass-upload-artifact'
491 # log info to console
492 echo "Uploading the $INSTALLER artifact. This could take some time..."
493 echo "--------------------------------------------------------"
496 # source the opnfv.properties to get ARTIFACT_VERSION
497 source $BUILD_DIRECTORY/opnfv.properties
499 # upload artifact and additional files to google storage
500 gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
501 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
502 gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
505 echo "--------------------------------------------------------"
507 echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
510 name: 'builder-compass-download-artifact'
518 # log info to console
519 echo "Downloading the $INSTALLER artifact. This could take some time..."
520 echo "--------------------------------------------------------"
523 # get the latest.properties file in order to get info regarding latest artifact
524 [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
525 curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
527 # check if we got the file
528 [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
530 # source the file so we get OPNFV vars
531 source $BUILD_DIRECTORY/latest.properties
534 curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
537 ls -al $BUILD_DIRECTORY/compass.iso
540 echo "--------------------------------------------------------"
544 name: 'builder-compass-workspace-cleanup'
552 # delete everything that is in $WORKSPACE
553 /bin/rm -rf $WORKSPACE
556 name: 'builder-compass-ci-preclean-workspace'
565 sudo rm $WORKSPACE -rf
566 git clone $GIT_BASE $WORKSPACE