summaryrefslogtreecommitdiffstats
path: root/jjb/compass4nfv
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/compass4nfv')
-rw-r--r--jjb/compass4nfv/compass-ci-jobs.yml96
-rw-r--r--jjb/compass4nfv/compass-deploy.sh28
-rw-r--r--jjb/compass4nfv/compass-project-jobs.yml52
-rw-r--r--jjb/compass4nfv/compass-upload-artifact.sh23
4 files changed, 139 insertions, 60 deletions
diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml
index 11fac7cc7..40f17b889 100644
--- a/jjb/compass4nfv/compass-ci-jobs.yml
+++ b/jjb/compass4nfv/compass-ci-jobs.yml
@@ -23,15 +23,22 @@
# brahmaputra
#--------------------------------
- huawei-us-deploy-bare-1:
+ os-version: 'trusty'
<<: *brahmaputra
- huawei-virtual:
+ os-version: 'trusty'
<<: *brahmaputra
#--------------------------------
# master
#--------------------------------
+ - huawei-us-deploy-bare-2:
+ os-version: 'centos7'
+ <<: *master
- intel-pod8:
+ os-version: 'trusty'
<<: *master
- huawei-virtual:
+ os-version: 'trusty'
<<: *master
scenario:
@@ -41,6 +48,9 @@
- 'os-odl_l2-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
+ - 'os-odl_l3-nofeature-ha':
+ disabled: false
+ auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
- 'os-onos-nofeature-ha':
disabled: false
auto-trigger-name: 'compass-{scenario}-{pod}-trigger'
@@ -58,22 +68,22 @@
- job-template:
name: 'compass-{scenario}-{pod}-daily-{stream}'
- node: huawei-build
-
- concurrent: false
+ concurrent: true
properties:
- throttle:
enabled: true
- max-total: 0
max-per-node: 1
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'compass-os-.*?-{pod}-daily-.*?'
+ - 'compass-verify-[^-]*'
+ block-level: 'NODE'
wrappers:
- build-name:
name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
- - timeout:
- timeout: 360
- fail: true
parameters:
- project-parameter:
@@ -94,8 +104,9 @@
- trigger-builds:
- project: 'compass-deploy-{pod}-daily-{stream}'
current-parameters: false
- predefined-parameters:
+ predefined-parameters: |
DEPLOY_SCENARIO={scenario}
+ COMPASS_OS_VERSION={os-version}
same-node: true
block: true
- trigger-builds:
@@ -131,16 +142,20 @@
properties:
- throttle:
enabled: true
- max-total: 0
max-per-node: 1
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - 'compass-deploy-{pod}-daily-{stream}'
+ - 'compass-deploy-{pod}-daily-.*?'
+ - 'compass-verify-deploy-.*?'
+ block-level: 'NODE'
wrappers:
- build-name:
name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+ - timeout:
+ timeout: 120
+ abort: true
parameters:
- project-parameter:
@@ -164,11 +179,9 @@
builders:
- shell:
- !include-raw: ./compass-workspace-precleanup.sh
- - shell:
- !include-raw: ./compass-download-artifact.sh
+ !include-raw-escape: ./compass-download-artifact.sh
- shell:
- !include-raw: ./compass-deploy.sh
+ !include-raw-escape: ./compass-deploy.sh
publishers:
- archive:
@@ -195,23 +208,42 @@
choices:
- 'liberty'
- 'juno'
- - choice:
- name: COMPASS_OS_VERSION
- choices:
- - 'trusty'
- - 'centos7'
########################
# trigger macros
########################
- trigger:
+ name: 'compass-os-nosdn-nofeature-ha-huawei-us-deploy-bare-2-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-odl_l2-nofeature-ha-huawei-us-deploy-bare-2-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-us-deploy-bare-2-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-onos-nofeature-ha-huawei-us-deploy-bare-2-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-os-ocl-nofeature-ha-huawei-us-deploy-bare-2-trigger'
+ triggers:
+ - timed: ''
+- trigger:
name: 'compass-os-nosdn-nofeature-ha-huawei-us-deploy-bare-1-trigger'
triggers:
- timed: '0 3 * * * '
- trigger:
name: 'compass-os-odl_l2-nofeature-ha-huawei-us-deploy-bare-1-trigger'
triggers:
- - timed: '0 20 * * *'
+ - timed: '0 21 * * *'
+- trigger:
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-us-deploy-bare-1-trigger'
+ triggers:
+ - timed: ''
- trigger:
name: 'compass-os-onos-nofeature-ha-huawei-us-deploy-bare-1-trigger'
triggers:
@@ -219,36 +251,44 @@
- trigger:
name: 'compass-os-ocl-nofeature-ha-huawei-us-deploy-bare-1-trigger'
triggers:
- - timed: ''
+ - timed: '0 9 * * *'
- trigger:
name: 'compass-os-nosdn-nofeature-ha-intel-pod8-trigger'
triggers:
- - timed: ''
+ - timed: '0 3 * * *'
- trigger:
name: 'compass-os-odl_l2-nofeature-ha-intel-pod8-trigger'
triggers:
+ - timed: '0 21 * * *'
+- trigger:
+ name: 'compass-os-odl_l3-nofeature-ha-intel-pod8-trigger'
+ triggers:
- timed: ''
- trigger:
name: 'compass-os-onos-nofeature-ha-intel-pod8-trigger'
triggers:
- - timed: ''
+ - timed: '0 15 * * *'
- trigger:
name: 'compass-os-ocl-nofeature-ha-intel-pod8-trigger'
triggers:
- - timed: ''
+ - timed: '0 9 * * *'
- trigger:
name: 'compass-os-nosdn-nofeature-ha-huawei-virtual-trigger'
triggers:
- - timed: ''
+ - timed: '0 3 * * *'
- trigger:
name: 'compass-os-odl_l2-nofeature-ha-huawei-virtual-trigger'
triggers:
- - timed: '0 16 * * *'
+ - timed: '0 21 * * *'
+- trigger:
+ name: 'compass-os-odl_l3-nofeature-ha-huawei-virtual-trigger'
+ triggers:
+ - timed: ''
- trigger:
name: 'compass-os-onos-nofeature-ha-huawei-virtual-trigger'
triggers:
- - timed: '0 16 * * *'
+ - timed: '0 15 * * *'
- trigger:
name: 'compass-os-ocl-nofeature-ha-huawei-virtual-trigger'
triggers:
- - timed: ''
+ - timed: '0 9 * * *'
diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh
index be15f8817..860f5da1b 100644
--- a/jjb/compass4nfv/compass-deploy.sh
+++ b/jjb/compass4nfv/compass-deploy.sh
@@ -6,22 +6,38 @@ echo "Starting the deployment on baremetal environment using $INSTALLER_TYPE. Th
echo "--------------------------------------------------------"
echo
+# source the properties file so we get OPNFV vars
+source $BUILD_DIRECTORY/latest.properties
+
+# echo the info about artifact that is used during the deployment
+echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment"
+
+if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
+ # for none-merge deployments
+ # checkout the commit that was used for building the downloaded artifact
+ # to make sure the ISO and deployment mechanism uses same versions
+ echo "Checking out $OPNFV_GIT_SHA1"
+ git checkout $OPNFV_GIT_SHA1 --quiet
+fi
+
+echo 1 > /proc/sys/vm/drop_caches
+
export CONFDIR=$WORKSPACE/deploy/conf
export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
if [[ "$NODE_NAME" =~ "-vm" ]]; then
export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/network.yml
- export DHA_CONF=$CONFDIR/vm_environment/${{DEPLOY_SCENARIO}}.yml
+ export DHA_CONF=$CONFDIR/vm_environment/${DEPLOY_SCENARIO}.yml
else
export INSTALL_NIC=eth1
export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/network.yml
- export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${{DEPLOY_SCENARIO}}.yml
+ export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml
fi
cd $WORKSPACE
-export OS_VERSION=${{COMPASS_OS_VERSION}}
-export OPENSTACK_VERSION=${{COMPASS_OPENSTACK_VERSION}}
-./deploy.sh --dha ${{DHA_CONF}} --network ${{NETWORK_CONF}}
+export OS_VERSION=${COMPASS_OS_VERSION}
+export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
+./deploy.sh --dha ${DHA_CONF} --network ${NETWORK_CONF}
if [ $? -ne 0 ]; then
echo "depolyment failed!"
deploy_ret=1
@@ -32,6 +48,6 @@ echo "--------------------------------------------------------"
echo "Done!"
ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
-sshpass -p root scp 2>/dev/null $ssh_options root@${{INSTALLER_IP}}:/var/ansible/run/openstack_${{COMPASS_OPENSTACK_VERSION}}-opnfv2/ansible.log ./ &> /dev/null
+sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null
exit $deploy_ret
diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml
index 3dd091f87..ed748aacb 100644
--- a/jjb/compass4nfv/compass-project-jobs.yml
+++ b/jjb/compass4nfv/compass-project-jobs.yml
@@ -8,9 +8,11 @@
stream:
- master:
+ slave_name: 'huawei-us-deploy-vm-1'
branch: '{stream}'
gs-pathname: ''
- brahmaputra:
+ slave_name: 'huawei-us-deploy-vm-2'
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
@@ -30,8 +32,6 @@
disabled: false
- node: 'huawei-virtual'
-
concurrent: true
wrappers:
@@ -42,8 +42,13 @@
properties:
- throttle:
enabled: true
- max-total: 0
max-per-node: 1
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'compass-verify-[^-]*'
+ - 'compass-os-.*?-virtual-daily-.*?'
+ block-level: 'NODE'
parameters:
- project-parameter:
@@ -53,18 +58,12 @@
- compass-project-parameter:
installer: '{installer}'
gs-pathname: '{gs-pathname}'
- - '{node}-defaults'
+ - 'huawei-virtual-defaults'
- '{installer}-defaults'
- string:
name: DEPLOY_SCENARIO
default: 'os-nosdn-nofeature-ha'
- scm:
- - gerrit-trigger-scm:
- credentials-id: '{ssh-credentials}'
- refspec: '$GERRIT_REFSPEC'
- choosing-strategy: 'gerrit'
-
triggers:
- gerrit:
trigger-on:
@@ -83,9 +82,12 @@
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**/{branch}'
+ file-paths:
+ - compare-type: ANT
+ pattern: '**/*'
forbidden-file-paths:
- compare-type: ANT
- pattern: 'docs/**|.gitignore'
+ pattern: 'docs/**'
builders:
- trigger-builds:
@@ -102,20 +104,24 @@
properties:
- throttle:
enabled: true
- max-total: 0
max-per-node: 1
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - 'compass-deploy-huawei-virtual-daily-.*?'
+ block-level: 'NODE'
scm:
- - git-scm:
+ - gerrit-trigger-scm:
credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
builders:
- shell:
- !include-raw: ./compass-build.sh
+ !include-raw-escape: ./compass-build.sh
- shell:
- !include-raw: ./compass-deploy.sh
+ !include-raw-escape: ./compass-deploy.sh
publishers:
- archive:
@@ -126,8 +132,6 @@
- job-template:
name: 'compass-build-iso-{stream}'
- node: ericsson-build
-
concurrent: true
properties:
@@ -142,7 +146,7 @@
- compass-project-parameter:
installer: '{installer}'
gs-pathname: '{gs-pathname}'
- - '{node}-defaults'
+ - 'ericsson-build-defaults'
- '{installer}-defaults'
scm:
@@ -156,11 +160,11 @@
builders:
- shell:
- !include-raw: ./compass-build.sh
+ !include-raw-escape: ./compass-build.sh
- shell:
- !include-raw: ./compass-upload-artifact.sh
+ !include-raw-escape: ./compass-upload-artifact.sh
- shell:
- !include-raw: ./compass-workspace-cleanup.sh
+ !include-raw-escape: ./compass-workspace-cleanup.sh
- job-template:
name: 'compass-build-ppa-{stream}'
@@ -193,7 +197,7 @@
builders:
- shell:
- !include-raw: ./compass-makeppa.sh
+ !include-raw-escape: ./compass-makeppa.sh
diff --git a/jjb/compass4nfv/compass-upload-artifact.sh b/jjb/compass4nfv/compass-upload-artifact.sh
index 1639fd562..34b1db98c 100644
--- a/jjb/compass4nfv/compass-upload-artifact.sh
+++ b/jjb/compass4nfv/compass-upload-artifact.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-set -o errexit
set -o nounset
set -o pipefail
@@ -16,7 +15,27 @@ gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSIO
gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
+gsutil -m setmeta \
+ -h "Content-Type:text/html" \
+ -h "Cache-Control:private, max-age=0, no-transform" \
+ gs://$GS_URL/latest.properties \
+ gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > /dev/null 2>&1
+
+gsutil -m setmeta \
+ -h "Cache-Control:private, max-age=0, no-transform" \
+ gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1
+
+# disabled errexit due to gsutil setmeta complaints
+# BadRequestException: 400 Invalid argument
+# check if we uploaded the file successfully to see if things are fine
+gsutil ls gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > /dev/null 2>&1
+if [[ $? -ne 0 ]]; then
+ echo "Problem while uploading artifact!"
+ echo "Check log $WORKSPACE/gsutil.iso.log on the machine where this build is done."
+ exit 1
+fi
+
echo
echo "--------------------------------------------------------"
echo "Done!"
-echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" \ No newline at end of file
+echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"