summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/apex/apex.yml31
-rw-r--r--jjb/compass4nfv/compass-build.sh41
-rw-r--r--jjb/compass4nfv/compass-ci-jobs.yml240
-rw-r--r--jjb/compass4nfv/compass-deploy-bare.sh30
-rw-r--r--jjb/compass4nfv/compass-deploy-virtual.sh26
-rw-r--r--jjb/compass4nfv/compass-download-artifact.sh29
-rw-r--r--jjb/compass4nfv/compass-makeppa.sh17
-rw-r--r--jjb/compass4nfv/compass-project-jobs.yml304
-rw-r--r--jjb/compass4nfv/compass-upload-artifact.sh22
-rw-r--r--jjb/compass4nfv/compass-workspace-cleanup.sh7
-rw-r--r--jjb/compass4nfv/compass-workspace-precleanup.sh8
-rw-r--r--jjb/compass4nfv/compass4nfv.yml567
-rw-r--r--jjb/compass4nfv/opnfv-compass4nfv.yml84
-rwxr-xr-xjjb/fuel/fuel-build.sh2
-rw-r--r--jjb/fuel/fuel-ci-jobs.yml46
-rwxr-xr-xjjb/fuel/fuel-deploy-new.sh59
-rwxr-xr-xjjb/fuel/fuel-deploy-virtual.sh2
-rw-r--r--jjb/fuel/fuel-project-jobs.yml22
-rw-r--r--jjb/functest/functest-ci-jobs.yml21
-rw-r--r--jjb/joid/joid-ci-jobs.yml2
-rw-r--r--jjb/joid/joid-deploy.sh82
-rw-r--r--jjb/opnfv/installer-params.yml8
-rw-r--r--jjb/opnfv/slave-params.yml60
-rw-r--r--jjb/qtip/qtip.yml52
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml13
25 files changed, 1041 insertions, 734 deletions
diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml
index 6866bf5ca..be595d4a3 100644
--- a/jjb/apex/apex.yml
+++ b/jjb/apex/apex.yml
@@ -76,6 +76,8 @@
use-build-blocker: true
blocking-jobs:
- "apex-daily.*"
+ - "apex-deploy.*"
+ - "apex-build.*"
builders:
- 'apex-build'
@@ -162,6 +164,12 @@
refspec: ''
branch: '{branch}'
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - "apex-deploy.*"
+
builders:
- 'apex-build'
- 'apex-deploy-virtual'
@@ -192,6 +200,14 @@
- apex-parameter:
gs-pathname: '{gs-pathname}'
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - "apex-verify.*"
+ - "apex-deploy.*"
+ - "apex-build.*"
+
builders:
- 'apex-deploy-virtual'
- 'apex-workspace-cleanup'
@@ -220,6 +236,15 @@
- apex-parameter:
gs-pathname: '{gs-pathname}'
+ properties:
+ - build-blocker:
+ use-build-blocker: true
+ blocking-jobs:
+ - "apex-verify.*"
+ - "apex-deploy.*"
+ - "apex-build.*"
+ - "apex-daily.*"
+
builders:
- 'apex-deploy-baremetal'
- 'apex-workspace-cleanup'
@@ -252,7 +277,9 @@
- build-blocker:
use-build-blocker: true
blocking-jobs:
- - "apex-daily.*"
+ - "apex-verify.*"
+ - "apex-deploy.*"
+ - "apex-build.*"
triggers:
- 'apex-{stream}'
@@ -263,7 +290,7 @@
git-revision: true
block: true
- trigger-builds:
- - project: 'apex-deploy-baremetal-{stream}'
+ - project: 'apex-deploy-virtual-{stream}'
git-revision: true
block: true
- trigger-builds:
diff --git a/jjb/compass4nfv/compass-build.sh b/jjb/compass4nfv/compass-build.sh
new file mode 100644
index 000000000..85b3ab47d
--- /dev/null
+++ b/jjb/compass4nfv/compass-build.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# log info to console
+echo "Starting the build of $INSTALLER_TYPE. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# create the cache directory if it doesn't exist
+[[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
+[[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
+
+# set OPNFV_ARTIFACT_VERSION
+export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
+
+# start the build
+if [ -d $PPA_CACHE ]
+then
+ cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f
+fi
+
+cd $WORKSPACE/
+./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY
+
+# list the build artifacts
+ls -al $BUILD_DIRECTORY
+
+# save information regarding artifact into file
+(
+ echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
+ echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
+ echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
+ echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
+ echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)"
+ echo "OPNFV_BUILD_URL=$BUILD_URL"
+) > $BUILD_DIRECTORY/opnfv.properties
+echo
+echo "--------------------------------------------------------"
+echo "Done!" \ No newline at end of file
diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml
new file mode 100644
index 000000000..693e1b0cd
--- /dev/null
+++ b/jjb/compass4nfv/compass-ci-jobs.yml
@@ -0,0 +1,240 @@
+- project:
+
+ name: compass-ci
+
+ installer: 'compass'
+
+ project: 'compass4nfv'
+
+ master: &master
+ stream: master
+ branch: '{stream}'
+ gs-pathname: ''
+ brahmaputra: &brahmaputra
+ stream: brahmaputra
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+
+#--------------------------------
+# POD, INSTALLER, AND BRANCH MAPPING
+#--------------------------------
+ pod:
+#--------------------------------
+# brahmaputra
+#--------------------------------
+ - huawei-us-deploy-bare-1:
+ <<: *brahmaputra
+#--------------------------------
+# master
+#--------------------------------
+ - intel-pod8:
+ <<: *master
+
+ sdn-controller:
+ - 'nosdn':
+ disabled: false
+ - 'odl':
+ disabled: false
+ - 'onos':
+ disabled: false
+# - 'opencontrail':
+# disabled: true
+
+ jobs:
+ - 'compass-{sdn-controller}-{pod}-daily-{stream}'
+ - 'compass-deploy-{pod}-daily-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+ name: 'compass-{sdn-controller}-{pod}-daily-{stream}'
+
+ project-type: multijob
+
+ node: huawei-build
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - compass-ci-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: SDN_CONTROLLER
+ default: '{sdn-controller}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'none'
+ - 'huawei-build-defaults'
+ - '{installer}-defaults'
+
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ triggers:
+ - 'compass-{pod}-{sdn-controller}-trigger'
+
+ builders:
+ - multijob:
+ name: deploy
+ condition: SUCCESSFUL
+ projects:
+ - name: 'compass-deploy-{pod}-daily-{stream}'
+ current-parameters: true
+ git-revision: true
+ kill-phase-on: FAILURE
+ - multijob:
+ name: functest
+ condition: COMPLETED
+ projects:
+ - name: 'functest-compass-{pod}-daily-{stream}'
+ current-parameters: true
+ kill-phase-on: NEVER
+ - multijob:
+ name: yardstick
+ condition: COMPLETED
+ projects:
+ - name: 'yardstick-compass-{pod}-daily-{stream}'
+ current-parameters: true
+ kill-phase-on: NEVER
+
+- job-template:
+ name: 'compass-deploy-{pod}-daily-{stream}'
+
+ disabled: false
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - compass-ci-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: SDN_CONTROLLER
+ default: '{sdn-controller}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'none'
+ - '{pod}-defaults'
+ - '{installer}-defaults'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+
+
+ builders:
+ - shell:
+ !include-raw ./compass-workspace-precleanup.sh
+ - shell:
+ !include-raw ./compass-download-artifact.sh
+ - shell:
+ !include-raw ./compass-deploy-bare.sh
+
+ publishers:
+ - archive:
+ artifacts: 'ansible.log'
+ allow-empty: 'true'
+ fingerprint: true
+
+########################
+# parameter macros
+########################
+- parameter:
+ name: compass-ci-parameter
+ parameters:
+ - string:
+ name: BUILD_DIRECTORY
+ default: $WORKSPACE/build_output
+ description: "Directory where the build artifact will be located upon the completion of the build."
+ - string:
+ name: CACHE_DIRECTORY
+ default: $HOME/opnfv/cache/$PROJECT
+ description: "Directory where the cache to be used during the build is located."
+ - string:
+ name: GS_URL
+ default: '$GS_BASE{gs-pathname}'
+ description: "URL to Google Storage."
+ - string:
+ name: PPA_REPO
+ default: "http://205.177.226.235:9999"
+ - string:
+ name: PPA_CACHE
+ default: "$WORKSPACE/work/repo/"
+ - choice:
+ name: COMPASS_OPENSTACK_VERSION
+ choices:
+ - 'liberty'
+ - 'juno'
+ - choice:
+ name: COMPASS_OS_VERSION
+ choices:
+ - 'trusty'
+ - 'centos7'
+
+########################
+# trigger macros
+########################
+- trigger:
+ name: 'compass-huawei-us-deploy-bare-1-nosdn-trigger'
+ triggers:
+ - timed: '0 16 * * * '
+- trigger:
+ name: 'compass-huawei-us-deploy-bare-1-odl-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-huawei-us-deploy-bare-1-onos-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-huawei-us-deploy-bare-1-opencontrail-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-intel-pod8-nosdn-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-intel-pod8-odl-trigger'
+ triggers:
+ - timed: '0 16 * * *'
+- trigger:
+ name: 'compass-intel-pod8-onos-trigger'
+ triggers:
+ - timed: ''
+- trigger:
+ name: 'compass-intel-pod8-opencontrail-trigger'
+ triggers:
+ - timed: ''
diff --git a/jjb/compass4nfv/compass-deploy-bare.sh b/jjb/compass4nfv/compass-deploy-bare.sh
new file mode 100644
index 000000000..12b9b337b
--- /dev/null
+++ b/jjb/compass4nfv/compass-deploy-bare.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+set -x
+
+# log info to console
+echo "Starting the deployment on baremetal environment using $INSTALLER_TYPE. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+export CONFDIR=$WORKSPACE/deploy/conf/hardware_environment/huawei_us_lab/pod1
+export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
+export INSTALL_NIC=eth0
+
+cd $WORKSPACE
+
+export OS_VERSION=${{COMPASS_OS_VERSION}}
+export OPENSTACK_VERSION=${{COMPASS_OPENSTACK_VERSION}}
+./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml
+if [ $? -ne 0 ]; then
+ echo "depolyment failed!"
+ deploy_ret=1
+fi
+
+echo
+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
+
+exit $deploy_ret
diff --git a/jjb/compass4nfv/compass-deploy-virtual.sh b/jjb/compass4nfv/compass-deploy-virtual.sh
new file mode 100644
index 000000000..b35658bd7
--- /dev/null
+++ b/jjb/compass4nfv/compass-deploy-virtual.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+set -x
+
+# log info to console
+echo "Starting the deployment on virtual environment using $INSTALLER_TYPE. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
+export OS_VERSION=${{COMPASS_OS_VERSION}}
+export OPENSTACK_VERSION=${{COMPASS_OPENSTACK_VERSION}}
+export CONFDIR=$WORKSPACE/deploy/conf/vm_environment
+./deploy.sh --dha $CONFDIR/$SDN_CONTROLLER.yml --network $CONFDIR/$NODE_NAME/network.yml
+if [ $? -ne 0 ]; then
+ echo "depolyment failed!"
+ deploy_ret=1
+fi
+
+echo
+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
+
+exit $deploy_ret
diff --git a/jjb/compass4nfv/compass-download-artifact.sh b/jjb/compass4nfv/compass-download-artifact.sh
new file mode 100644
index 000000000..5a63c4aeb
--- /dev/null
+++ b/jjb/compass4nfv/compass-download-artifact.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# log info to console
+echo "Downloading the $INSTALLER_TYPE artifact. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# get the latest.properties file in order to get info regarding latest artifact
+[[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
+curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
+
+# check if we got the file
+[[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
+
+# source the file so we get OPNFV vars
+source $BUILD_DIRECTORY/latest.properties
+
+# download the file
+curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
+
+# list the file
+ls -al $BUILD_DIRECTORY/compass.iso
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!" \ No newline at end of file
diff --git a/jjb/compass4nfv/compass-makeppa.sh b/jjb/compass4nfv/compass-makeppa.sh
new file mode 100644
index 000000000..83cc059c0
--- /dev/null
+++ b/jjb/compass4nfv/compass-makeppa.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -x
+set -o errexit
+set -o nounset
+set -o pipefail
+# make ppa
+cd $WORKSPACE/
+./build/make_repo.sh
+# calc MD5 of ppa
+cd $PPA_CACHE
+for i in $(find *.gz *.iso *.img -type f)
+do
+ md5=$(md5sum $i | cut -d ' ' -f1)
+ echo $md5 > $i.md5
+ curl -T $i $PPA_REPO
+ curl -T $i.md5 $PPA_REPO
+done \ No newline at end of file
diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml
new file mode 100644
index 000000000..1395fa532
--- /dev/null
+++ b/jjb/compass4nfv/compass-project-jobs.yml
@@ -0,0 +1,304 @@
+- project:
+
+ name: compass-project
+
+ installer: 'compass'
+
+ project: 'compass4nfv'
+
+ stream:
+ - master:
+ branch: '{stream}'
+ gs-pathname: ''
+ - brahmaputra:
+ branch: 'stable/{stream}'
+ gs-pathname: '/{stream}'
+
+
+ sdn-controller:
+ - 'nosdn':
+ disabled: false
+ node: huawei-deploy-vm
+ - 'odl':
+ disabled: false
+ node: huawei-deploy-vm
+ - 'onos':
+ disabled: false
+ node: huawei-deploy-vm
+# - 'opencontrail':
+# disabled: true
+# node: huawei-deploy-vm
+
+ jobs:
+ - 'compass-verify-{stream}'
+ - 'compass-build-iso-{stream}'
+ - 'compass-build-ppa-{stream}'
+ - 'compass-deploy-virtual-{sdn-controller}-{stream}'
+ - 'compass-virtual-daily-{stream}'
+
+########################
+# job templates
+########################
+- job-template:
+ name: 'compass-verify-{stream}'
+
+ disabled: false
+
+ node: 'huawei-deploy-vm'
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 3
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: '{branch}'
+ - compass-project-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - '{node}-defaults'
+ - '{installer}-defaults'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: '{project}'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/{branch}'
+ forbidden-file-paths:
+ - compare-type: ANT
+ pattern: 'docs/**|.gitignore'
+
+ builders:
+ - shell:
+ !include-raw ./compass-build.sh
+ - shell:
+ !include-raw ./compass-deploy-virtual.sh
+
+ publishers:
+ - archive:
+ artifacts: 'ansible.log'
+ allow-empty: 'true'
+ fingerprint: true
+
+- job-template:
+ name: 'compass-virtual-daily-{stream}'
+
+ node: huawei-build
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - compass-project-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - '{node}-defaults'
+ - '{installer}-defaults'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ triggers:
+ - timed: 'H 16 * * *'
+
+ builders:
+ - trigger-builds:
+ - project: 'compass-build-iso-{stream}'
+ git-revision: true
+ block: true
+ - trigger-builds:
+ - project: 'compass-deploy-virtual-nosdn-{stream}'
+ git-revision: true
+ block: false
+ - trigger-builds:
+ - project: 'compass-deploy-virtual-odl-{stream}'
+ git-revision: true
+ block: false
+ - trigger-builds:
+ - project: 'compass-deploy-virtual-onos-{stream}'
+ git-revision: true
+ block: false
+
+- job-template:
+ name: 'compass-build-iso-{stream}'
+
+ node: ericsson-build
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - compass-project-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - '{node}-defaults'
+ - '{installer}-defaults'
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ builders:
+ - shell:
+ !include-raw ./compass-build.sh
+ - shell:
+ !include-raw ./compass-upload-artifact.sh
+ - shell:
+ !include-raw ./compass-workspace-cleanup.sh
+
+- job-template:
+ name: 'compass-build-ppa-{stream}'
+
+ description: "build ppa(using docker) in huawei lab"
+
+ node: huawei-build
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - compass-project-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - '{node}-defaults'
+ - '{installer}-defaults'
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: '{branch}'
+
+ builders:
+ - shell:
+ !include-raw ./compass-makeppa.sh
+
+- job-template:
+ name: 'compass-deploy-virtual-{sdn-controller}-{stream}'
+
+ disabled: false
+
+ node: '{node}'
+
+ concurrent: true
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - compass-project-parameter:
+ installer: '{installer}'
+ gs-pathname: '{gs-pathname}'
+ - string:
+ name: SDN_CONTROLLER
+ default: '{sdn-controller}'
+ - string:
+ name: DEPLOY_SCENARIO
+ default: 'none'
+ - '{node}-defaults'
+ - '{installer}-defaults'
+
+ builders:
+ - shell:
+ !include-raw ./compass-workspace-precleanup.sh
+ - shell:
+ !include-raw ./compass-download-artifact.sh
+ - shell:
+ !include-raw ./compass-deploy-virtual.sh
+
+ publishers:
+ - archive:
+ artifacts: 'ansible.log'
+ allow-empty: 'true'
+ fingerprint: true
+
+########################
+# parameter macros
+########################
+- parameter:
+ name: compass-project-parameter
+ parameters:
+ - string:
+ name: BUILD_DIRECTORY
+ default: $WORKSPACE/build_output
+ description: "Directory where the build artifact will be located upon the completion of the build."
+ - string:
+ name: CACHE_DIRECTORY
+ default: $HOME/opnfv/cache/$PROJECT
+ description: "Directory where the cache to be used during the build is located."
+ - string:
+ name: GS_URL
+ default: '$GS_BASE{gs-pathname}'
+ description: "URL to Google Storage."
+ - string:
+ name: PPA_REPO
+ default: "http://205.177.226.235:9999"
+ - string:
+ name: PPA_CACHE
+ default: "$WORKSPACE/work/repo/"
+ - choice:
+ name: COMPASS_OPENSTACK_VERSION
+ choices:
+ - 'liberty'
+ - 'juno'
+ - choice:
+ name: COMPASS_OS_VERSION
+ choices:
+ - 'trusty'
+ - 'centos7'
+
diff --git a/jjb/compass4nfv/compass-upload-artifact.sh b/jjb/compass4nfv/compass-upload-artifact.sh
new file mode 100644
index 000000000..1639fd562
--- /dev/null
+++ b/jjb/compass4nfv/compass-upload-artifact.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# log info to console
+echo "Uploading the $INSTALLER_TYPE artifact. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# source the opnfv.properties to get ARTIFACT_VERSION
+source $BUILD_DIRECTORY/opnfv.properties
+
+# upload artifact and additional files to google storage
+gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
+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
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
+echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso" \ No newline at end of file
diff --git a/jjb/compass4nfv/compass-workspace-cleanup.sh b/jjb/compass4nfv/compass-workspace-cleanup.sh
new file mode 100644
index 000000000..98201af9b
--- /dev/null
+++ b/jjb/compass4nfv/compass-workspace-cleanup.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# delete everything that is in $WORKSPACE
+/bin/rm -rf $WORKSPACE \ No newline at end of file
diff --git a/jjb/compass4nfv/compass-workspace-precleanup.sh b/jjb/compass4nfv/compass-workspace-precleanup.sh
new file mode 100644
index 000000000..e4a301bab
--- /dev/null
+++ b/jjb/compass4nfv/compass-workspace-precleanup.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+cd $WORKSPACE/..
+sudo rm $WORKSPACE -rf
+git clone $GIT_BASE $WORKSPACE \ No newline at end of file
diff --git a/jjb/compass4nfv/compass4nfv.yml b/jjb/compass4nfv/compass4nfv.yml
deleted file mode 100644
index 018145e4e..000000000
--- a/jjb/compass4nfv/compass4nfv.yml
+++ /dev/null
@@ -1,567 +0,0 @@
-- project:
-
- name: compass
-
- installer: 'compass'
-
- jobs:
- - 'compass-verify-{stream}'
- - 'compass-daily-{stream}'
- - 'compass-build-iso-{stream}'
- - 'compass-build-ppa-{stream}'
- - 'compass-deploy-virtual-{sdn-controller}-{stream}'
- - 'compass-deploy-bare-huawei-us-{stream}'
-
-# only master branch is enabled at the moment to keep no of jobs sane
- stream:
- - master:
- branch: '{stream}'
- gs-pathname: ''
-# - brahmaputra:
-# branch: 'stable/{stream}'
-# gs-pathname: '/{stream}'
-
- sdn-controller:
- - 'nosdn':
- disabled: false
- node: huawei-deploy-vm
- - 'odl':
- disabled: false
- node: huawei-deploy-vm
- - 'onos':
- disabled: false
- node: huawei-deploy-vm
- - 'opencontrail':
- disabled: true
- node: huawei-deploy-vm
-
- project: 'compass4nfv'
-
-########################
-# job templates
-########################
-- job-template:
- name: 'compass-verify-{stream}'
-
- disabled: false
-
- node: 'huawei-deploy-vm'
-
- concurrent: true
-
- properties:
- - throttle:
- enabled: true
- max-total: 3
- max-per-node: 1
-
- parameters:
- - project-parameter:
- project: '{project}'
- - gerrit-parameter:
- branch: '{branch}'
- - compass-parameter:
- installer: '{installer}'
- gs-pathname: '{gs-pathname}'
- - string:
- name: SDN_CONTROLLER
- default: 'nosdn'
- scm:
- - gerrit-trigger-scm:
- credentials-id: '{ssh-credentials}'
- refspec: '$GERRIT_REFSPEC'
- choosing-strategy: 'gerrit'
-
- triggers:
- - gerrit:
- trigger-on:
- - patchset-created-event:
- exclude-drafts: 'false'
- exclude-trivial-rebase: 'false'
- exclude-no-code-change: 'false'
- - draft-published-event
- - comment-added-contains-event:
- comment-contains-value: 'recheck'
- - comment-added-contains-event:
- comment-contains-value: 'reverify'
- projects:
- - project-compare-type: 'ANT'
- project-pattern: '{project}'
- branches:
- - branch-compare-type: 'ANT'
- branch-pattern: '**/{branch}'
- forbidden-file-paths:
- - compare-type: ANT
- pattern: 'docs/**|.gitignore'
-
- builders:
- - 'builder-compass-build-iso'
- - 'builder-compass-deploy-virtual'
- publishers:
- - archive:
- artifacts: 'ansible.log'
- allow-empty: 'true'
- fingerprint: true
-
-- job-template:
- name: 'compass-daily-{stream}'
-
- node: huawei-build
-
- concurrent: true
-
- properties:
- - throttle:
- enabled: true
- max-total: 1
- max-per-node: 1
-
- parameters:
- - project-parameter:
- project: '{project}'
- - compass-parameter:
- installer: '{installer}'
- gs-pathname: '{gs-pathname}'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
-
- triggers:
- - timed: 'H 16 * * *'
-
- builders:
- - trigger-builds:
- - project: 'compass-build-iso-{stream}'
- git-revision: true
- block: true
- - trigger-builds:
- - project: 'compass-deploy-virtual-nosdn-{stream}'
- git-revision: true
- block: false
- - trigger-builds:
- - project: 'compass-deploy-virtual-odl-{stream}'
- git-revision: true
- block: false
- - trigger-builds:
- - project: 'compass-deploy-virtual-onos-{stream}'
- git-revision: true
- block: false
- - trigger-builds:
- - project: 'compass-deploy-bare-huawei-us-{stream}'
- git-revision: true
- block: false
-
-
-- job-template:
- name: 'compass-build-iso-{stream}'
-
- node: ericsson-build
-
- concurrent: true
-
- properties:
- - throttle:
- enabled: true
- max-total: 1
- max-per-node: 1
-
- parameters:
- - project-parameter:
- project: '{project}'
- - compass-parameter:
- installer: '{installer}'
- gs-pathname: '{gs-pathname}'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
-
- builders:
- - 'builder-compass-build-iso'
- - 'builder-compass-upload-artifact'
- - 'builder-compass-workspace-cleanup'
-
-- job-template:
- name: 'compass-build-ppa-{stream}'
-
- description: "build ppa(using docker) in huawei lab"
-
- node: huawei-build
-
- concurrent: true
-
- properties:
- - throttle:
- enabled: true
- max-total: 1
- max-per-node: 1
-
- parameters:
- - project-parameter:
- project: '{project}'
- - compass-parameter:
- installer: '{installer}'
- gs-pathname: '{gs-pathname}'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
-
- triggers:
- - timed: 'H 16 * * *'
-
- builders:
- - 'builder-compass-make-ppa'
-
-- job-template:
- name: 'compass-deploy-virtual-{sdn-controller}-{stream}'
-
- disabled: false
-
- node: '{node}'
-
- concurrent: true
-
- properties:
- - throttle:
- enabled: true
- max-total: 1
- max-per-node: 1
-
- parameters:
- - project-parameter:
- project: '{project}'
- - compass-parameter:
- installer: '{installer}'
- gs-pathname: '{gs-pathname}'
- - string:
- name: SDN_CONTROLLER
- default: '{sdn-controller}'
-
- builders:
- - 'builder-compass-ci-preclean-workspace'
- - 'builder-compass-download-artifact'
- - 'builder-compass-deploy-virtual'
- publishers:
- - archive:
- artifacts: 'ansible.log'
- allow-empty: 'true'
- fingerprint: true
-
-- job-template:
- name: 'compass-deploy-bare-huawei-us-{stream}'
-
- disabled: false
-
- node: 'huawei-us-deploy-bare-1'
-
- concurrent: true
-
- properties:
- - throttle:
- enabled: true
- max-total: 1
- max-per-node: 1
-
- parameters:
- - project-parameter:
- project: '{project}'
- - compass-parameter:
- installer: '{installer}'
- gs-pathname: '{gs-pathname}'
- - string:
- name: SDN_CONTROLLER
- default: '{sdn-controller}'
-
- builders:
- - 'builder-compass-ci-preclean-workspace'
- - 'builder-compass-download-artifact'
- - 'builder-compass-deploy-bare'
-
- publishers:
- - archive:
- artifacts: 'ansible.log'
- allow-empty: 'true'
- fingerprint: true
-
-########################
-# parameter macros
-########################
-- parameter:
- name: compass-parameter
- parameters:
- - string:
- name: INSTALLER
- default: '{installer}'
- description: "Installer to use."
- - string:
- name: BUILD_DIRECTORY
- default: $WORKSPACE/build_output
- description: "Directory where the build artifact will be located upon the completion of the build."
- - string:
- name: CACHE_DIRECTORY
- default: $HOME/opnfv/cache/$PROJECT
- description: "Directory where the cache to be used during the build is located."
- - string:
- name: GIT_BASE
- default: https://gerrit.opnfv.org/gerrit/$PROJECT
- description: "Used for overriding the GIT URL coming from Global Jenkins configuration in case if the stuff is done on none-LF HW."
- - string:
- name: GS_URL
- default: artifacts.opnfv.org/$PROJECT{gs-pathname}
- description: "URL to Google Storage."
- - string:
- name: GS_URL_PROXY
- default: build.opnfv.org/artifacts/$PROJECT/
- description: "URL to Google Storage proxy"
- - string:
- name: installer_ip
- default: "192.168.200.2"
- - string:
- name: PPA_REPO
- default: "http://205.177.226.235:9999"
- - string:
- name: PPA_CACHE
- default: "$WORKSPACE/work/repo/"
- - choice:
- name: COMPASS_OPENSTACK_VERSION
- choices:
- - 'liberty'
- - 'juno'
- - choice:
- name: COMPASS_OS_VERSION
- choices:
- - 'trusty'
- - 'centos7'
-
-########################
-# builder macros
-########################
-- builder:
- name: 'builder-compass-make-ppa'
- builders:
- - shell: |
- #!/bin/bash
- set -x
- set -o errexit
- set -o nounset
- set -o pipefail
- # make ppa
- cd $WORKSPACE/
- ./build/make_repo.sh
- # calc MD5 of ppa
- cd $PPA_CACHE
- for i in $(find *.gz *.iso *.img -type f)
- do
- md5=$(md5sum $i | cut -d ' ' -f1)
- echo $md5 > $i.md5
- curl -T $i $PPA_REPO
- curl -T $i.md5 $PPA_REPO
- done
-
-- builder:
- name: 'builder-compass-build-iso'
- builders:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o nounset
- set -o pipefail
-
- # log info to console
- echo "Starting the build of $INSTALLER. This could take some time..."
- echo "--------------------------------------------------------"
- echo
-
- # create the cache directory if it doesn't exist
- [[ -d $CACHE_DIRECTORY ]] || mkdir -p $CACHE_DIRECTORY
- [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
-
- # set OPNFV_ARTIFACT_VERSION
- export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S")
-
- # start the build
- if [ -d $PPA_CACHE ]
- then
- cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f
- fi
-
- cd $WORKSPACE/
- ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY
-
- # list the build artifacts
- ls -al $BUILD_DIRECTORY
-
- # save information regarding artifact into file
- (
- echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
- echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
- echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
- echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
- echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/compass.iso | cut -d' ' -f1)"
- echo "OPNFV_BUILD_URL=$BUILD_URL"
- ) > $BUILD_DIRECTORY/opnfv.properties
- echo
- echo "--------------------------------------------------------"
- echo "Done!"
-
-- builder:
- name: 'builder-compass-deploy-virtual'
- builders:
- - shell: |
- #!/bin/bash
- set -x
-
- # log info to console
- echo "Starting the deployment on virtual environment using $INSTALLER. This could take some time..."
- echo "--------------------------------------------------------"
- echo
-
- export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
- export OS_VERSION=${COMPASS_OS_VERSION}
- export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
- export CONFDIR=$WORKSPACE/deploy/conf/vm_environment
- ./deploy.sh --dha $CONFDIR/$SDN_CONTROLLER.yml --network $CONFDIR/$NODE_NAME/network.yml
- if [ $? -ne 0 ]; then
- echo "depolyment failed!"
- deploy_ret=1
- fi
-
- echo
- 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
-
- exit $deploy_ret
-
-- builder:
- name: 'builder-compass-deploy-bare'
- builders:
- - shell: |
- #!/bin/bash
- set -x
-
- # log info to console
- echo "Starting the deployment on baremetal environment using $INSTALLER. This could take some time..."
- echo "--------------------------------------------------------"
- echo
-
- export CONFDIR=$WORKSPACE/deploy/conf/hardware_environment/huawei_us_lab/pod1
- export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
- export EXTERNAL_NIC=eth0
- export INSTALL_NIC=eth1
-
- cd $WORKSPACE
-
- export OS_VERSION=${COMPASS_OS_VERSION}
- export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
- ./deploy.sh --dha $CONFDIR/dha.yml --network $CONFDIR/network.yml
- if [ $? -ne 0 ]; then
- echo "depolyment failed!"
- deploy_ret=1
- fi
-
- echo
- 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
-
- exit $deploy_ret
-
-- builder:
- name: 'builder-compass-upload-artifact'
- builders:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o nounset
- set -o pipefail
-
- # log info to console
- echo "Uploading the $INSTALLER artifact. This could take some time..."
- echo "--------------------------------------------------------"
- echo
-
- # source the opnfv.properties to get ARTIFACT_VERSION
- source $BUILD_DIRECTORY/opnfv.properties
-
- # upload artifact and additional files to google storage
- gsutil cp $BUILD_DIRECTORY/compass.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
- 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
-
- echo
- echo "--------------------------------------------------------"
- echo "Done!"
- echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
-
-- builder:
- name: 'builder-compass-download-artifact'
- builders:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o nounset
- set -o pipefail
-
- # log info to console
- echo "Downloading the $INSTALLER artifact. This could take some time..."
- echo "--------------------------------------------------------"
- echo
-
- # get the latest.properties file in order to get info regarding latest artifact
- [[ -d $BUILD_DIRECTORY ]] || mkdir -p $BUILD_DIRECTORY
- curl -s -o $BUILD_DIRECTORY/latest.properties http://$GS_URL/latest.properties
-
- # check if we got the file
- [[ -f $BUILD_DIRECTORY/latest.properties ]] || exit 1
-
- # source the file so we get OPNFV vars
- source $BUILD_DIRECTORY/latest.properties
-
- # download the file
- curl -s -o $BUILD_DIRECTORY/compass.iso http://$OPNFV_ARTIFACT_URL > gsutil.iso.log 2>&1
-
- # list the file
- ls -al $BUILD_DIRECTORY/compass.iso
-
- echo
- echo "--------------------------------------------------------"
- echo "Done!"
-
-- builder:
- name: 'builder-compass-workspace-cleanup'
- builders:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o nounset
- set -o pipefail
-
- # delete everything that is in $WORKSPACE
- /bin/rm -rf $WORKSPACE
-
-- builder:
- name: 'builder-compass-ci-preclean-workspace'
- builders:
- - shell: |
- #!/bin/bash
- set -o errexit
- set -o nounset
- set -o pipefail
-
- cd $WORKSPACE/..
- sudo rm $WORKSPACE -rf
- git clone $GIT_BASE $WORKSPACE
-
diff --git a/jjb/compass4nfv/opnfv-compass4nfv.yml b/jjb/compass4nfv/opnfv-compass4nfv.yml
deleted file mode 100644
index 288c7abe6..000000000
--- a/jjb/compass4nfv/opnfv-compass4nfv.yml
+++ /dev/null
@@ -1,84 +0,0 @@
-########################
-# Job configuration for compass4nfv
-########################
-- project:
-
- name: 'opnfv-compass4nfv'
-
- installer: 'compass'
-
- controller:
- - 'odl'
- - 'onos'
- - 'opencontrail'
-
- pod: 'huawei-us-deploy-bare-1'
-
- stream:
- - master:
- branch: 'master'
- gs-pathname: ''
-
- jobs:
- - 'opnfv-compass4nfv-{controller}-{pod}-daily-{stream}'
- - 'opnfv-compass4nfv-deploy-{pod}-daily-{stream}'
-
-########################
-# job templates
-########################
-- job-template:
- name: 'opnfv-compass4nfv-{controller}-{pod}-daily-{stream}'
-
- disabled: true
-
- concurrent: false
-
- parameters:
- - project-parameter:
- project: '{installer}'
- - '{pod}-defaults'
- - '{installer}-defaults':
- controller: '{controller}'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
-
- builders:
- - trigger-builds:
- - project: 'opnfv-compass4nfv-daily-deploy-{stream}'
- git-revision: true
- block: true
- predefined-parameters:
- CONTROLLER={controller}
-
-- job-template:
- name: 'opnfv-compass4nfv-deploy-{pod}-daily-{stream}'
-
- disabled: true
-
- concurrent: false
-
- wrappers:
- - build-name:
- name: '$BUILD_NUMBER: {installer} $CONTROLLER'
-
- parameters:
- - project-parameter:
- project: '{installer}'
- - '{pod}-defaults'
- - '{installer}-defaults'
-
- scm:
- - git-scm:
- credentials-id: '{ssh-credentials}'
- refspec: ''
- branch: '{branch}'
-
- builders:
- - shell: |
- #!/bin/bash
- echo "Hello World from OPNFV $INSTALLER_TYPE"
- echo "Running $INSTALLER_TYPE with controller $CONTROLLER"
diff --git a/jjb/fuel/fuel-build.sh b/jjb/fuel/fuel-build.sh
index d6a71e00b..d51637afd 100755
--- a/jjb/fuel/fuel-build.sh
+++ b/jjb/fuel/fuel-build.sh
@@ -56,7 +56,7 @@ if [[ "$JOB_NAME" =~ "verify" && "$GERRIT_CHANGE_COMMIT_MESSAGE" =~ "$NOCACHE_PA
echo "The cache will not be used for this build!"
NOCACHE_ARG="-f P"
fi
-NOCACHE_ARG=${{NOCACHE_ARG:-}}
+NOCACHE_ARG=${NOCACHE_ARG:-}
# start the build
cd $WORKSPACE/ci
diff --git a/jjb/fuel/fuel-ci-jobs.yml b/jjb/fuel/fuel-ci-jobs.yml
index 1b4b26963..452d03712 100644
--- a/jjb/fuel/fuel-ci-jobs.yml
+++ b/jjb/fuel/fuel-ci-jobs.yml
@@ -49,6 +49,7 @@
jobs:
- 'fuel-{sdn-controller}-{pod}-daily-{stream}'
- 'fuel-deploy-{pod}-daily-{stream}'
+ - 'fuel-deploy-{pod}-daily-{stream}-wip'
########################
# job templates
@@ -150,9 +151,48 @@
builders:
- shell:
- !include-raw ./fuel-download-artifact.sh
+ !include-raw-escape: ./fuel-download-artifact.sh
- shell:
- !include-raw ./fuel-deploy.sh
+ !include-raw-escape: ./fuel-deploy.sh
+
+ publishers:
+ - email:
+ recipients: jonas.bjurel@ericsson.com stefan.k.berg@ericsson.com
+
+- job-template:
+ name: 'fuel-deploy-{pod}-daily-{stream}-wip'
+
+ concurrent: false
+
+ properties:
+ - throttle:
+ enabled: true
+ max-total: 1
+ max-per-node: 1
+
+ parameters:
+ - project-parameter:
+ project: 'fuel'
+ - 'ericsson-pod2-defaults'
+ - 'fuel-defaults'
+ - fuel-ci-parameter:
+ gs-pathname: ''
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: 'master'
+
+ wrappers:
+ - build-name:
+ name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+
+ builders:
+ - shell:
+ !include-raw-escape: ./fuel-download-artifact.sh
+ - shell:
+ !include-raw-escape: ./fuel-deploy-new.sh
publishers:
- email:
@@ -191,4 +231,4 @@
- trigger:
name: 'fuel-ericsson-pod2-nosdn-trigger'
triggers:
- - timed: '0 2 * * *'
+ - timed: ''
diff --git a/jjb/fuel/fuel-deploy-new.sh b/jjb/fuel/fuel-deploy-new.sh
new file mode 100755
index 000000000..1e362bc8f
--- /dev/null
+++ b/jjb/fuel/fuel-deploy-new.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+set -o errexit
+set -o nounset
+set -o pipefail
+
+# source the file so we get OPNFV vars
+source latest.properties
+
+# echo the info about artifact that is used during the deployment
+echo "Using $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3) for deployment"
+
+# 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
+
+# set deployment parameters
+BRIDGE=pxebr
+export TMPDIR=$HOME/tmpdir
+LAB_NAME=${NODE_NAME/-*}
+POD_NAME=${NODE_NAME/*-}
+
+# create TMPDIR if it doesn't exist
+mkdir -p $TMPDIR
+
+# change permissions down to TMPDIR
+chmod a+x $HOME
+chmod a+x $TMPDIR
+
+# clone the securedlab repo
+cd $WORKSPACE
+echo "Cloning securedlab repo"
+git clone ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab
+
+# construct the command
+DEPLOY_COMMAND="sudo $WORKSPACE/ci/deploy.sh -b file://$WORKSPACE/securedlab -l $LAB_NAME -p $POD_NAME -s $DEPLOY_SCENARIO -i $WORKSPACE/opnfv.iso -H -B $BRIDGE -S $TMPDIR"
+
+# log info to console
+echo "Deployment parameters"
+echo "Scenario: $DEPLOY_SCENARIO"
+echo "--------------------------------------------------------"
+echo "Lab: $LAB_NAME"
+echo "POD: $POD_NAME"
+echo "ISO: $(echo $OPNFV_ARTIFACT_URL | cut -d'/' -f3)"
+echo
+echo "Starting the deployment using $INSTALLER_TYPE. This could take some time..."
+echo "--------------------------------------------------------"
+echo
+
+# start the deployment
+echo "Issuing command"
+echo "$DEPLOY_COMMAND"
+echo
+
+$DEPLOY_COMMAND
+
+echo
+echo "--------------------------------------------------------"
+echo "Done!"
diff --git a/jjb/fuel/fuel-deploy-virtual.sh b/jjb/fuel/fuel-deploy-virtual.sh
index 8e9282373..e7c83b77f 100755
--- a/jjb/fuel/fuel-deploy-virtual.sh
+++ b/jjb/fuel/fuel-deploy-virtual.sh
@@ -24,7 +24,7 @@ chmod a+x $TMPDIR
# get the lab name from SLAVE_NAME
# we currently support ericsson and intel labs
-LAB_NAME=${{NODE_NAME%%-*}}
+LAB_NAME=${NODE_NAME%%-*}
if [[ ! "$LAB_NAME" =~ (ericsson|intel) ]]; then
echo "Unsupported/unidentified lab $LAB_NAME. Cannot continue!"
exit 1
diff --git a/jjb/fuel/fuel-project-jobs.yml b/jjb/fuel/fuel-project-jobs.yml
index 848fd0b21..a04e4e65d 100644
--- a/jjb/fuel/fuel-project-jobs.yml
+++ b/jjb/fuel/fuel-project-jobs.yml
@@ -60,11 +60,11 @@
builders:
- shell:
- !include-raw ./fuel-build.sh
+ !include-raw-escape: ./fuel-build.sh
- shell:
- !include-raw ./fuel-upload-artifact.sh
+ !include-raw-escape: ./fuel-upload-artifact.sh
- shell:
- !include-raw ./fuel-workspace-cleanup.sh
+ !include-raw-escape: ./fuel-workspace-cleanup.sh
publishers:
- email:
@@ -125,9 +125,9 @@
builders:
- shell:
- !include-raw ./fuel-build.sh
+ !include-raw-escape: ./fuel-build.sh
- shell:
- !include-raw ./fuel-workspace-cleanup.sh
+ !include-raw-escape: ./fuel-workspace-cleanup.sh
- job-template:
name: 'fuel-merge-build-{stream}'
@@ -176,11 +176,11 @@
builders:
- shell:
- !include-raw ./fuel-build.sh
+ !include-raw-escape: ./fuel-build.sh
- shell:
- !include-raw ./fuel-upload-artifact.sh
+ !include-raw-escape: ./fuel-upload-artifact.sh
- shell:
- !include-raw ./fuel-workspace-cleanup.sh
+ !include-raw-escape: ./fuel-workspace-cleanup.sh
- job-template:
name: 'fuel-merge-deploy-virtual-{stream}'
@@ -228,11 +228,11 @@
builders:
- shell:
- !include-raw ./fuel-download-artifact.sh
+ !include-raw-escape: ./fuel-download-artifact.sh
- shell:
- !include-raw ./fuel-deploy-virtual.sh
+ !include-raw-escape: ./fuel-deploy-virtual.sh
- shell:
- !include-raw ./fuel-workspace-cleanup.sh
+ !include-raw-escape: ./fuel-workspace-cleanup.sh
publishers:
- email:
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 249f9f0d6..bd7affef3 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -29,16 +29,19 @@
- intel-pod5:
installer: joid
<<: *brahmaputra
+ - huawei-us-deploy-bare-1:
+ installer: compass
+ <<: *brahmaputra
#--------------------------------
# master
#--------------------------------
- - huawei-us-deploy-bare-1:
- installer: compass
- <<: *master
- intel-pod6:
installer: joid
<<: *master
- - intel-us-deploy-virtual-2:
+ - intel-pod8:
+ installer: compass
+ <<: *master
+ - opnfv-jump-1:
installer: apex
<<: *master
- ericsson-pod1:
@@ -183,20 +186,18 @@
# labconfig is used only for joid
labconfig=""
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
- INSTALLER_IP=$(grep instack /var/lib/libvirt/dnsmasq/default.leases \
- |awk '{print $3}' | head -n 1)
+ instack_mac=$(sudo virsh domiflist instack | grep default | \
+ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+")
+ INSTALLER_IP=$(/usr/sbin/arp -e | grep ${instack_mac} | awk {'print $1'})
sshkey="-v /root/.ssh/id_rsa:/root/.ssh/id_rsa"
sudo iptables -D FORWARD -o virbr0 -j REJECT --reject-with icmp-port-unreachable
sudo iptables -D FORWARD -i virbr0 -j REJECT --reject-with icmp-port-unreachable
elif [[ ${INSTALLER_TYPE} == 'joid' ]]; then
# If production lab then creds may be retrieved dynamically
# creds are on the jumphost, always in the same folder
- labconfig="-v $HOME/joid_config/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
+ labconfig="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds"
# If dev lab, credentials may not be the default ones, just provide a path to put them into docker
# replace the default one by the customized one provided by jenkins config
- if [ -n "${LAB_CONFIG}" ]; then
- labconfig="-v ${LAB_CONFIG}:/home/opnfv/functest/conf/openstack.creds"
- fi
fi
echo "Functest: Start Docker and prepare environment"
envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}"
diff --git a/jjb/joid/joid-ci-jobs.yml b/jjb/joid/joid-ci-jobs.yml
index 4a8b60db5..0cc931085 100644
--- a/jjb/joid/joid-ci-jobs.yml
+++ b/jjb/joid/joid-ci-jobs.yml
@@ -156,7 +156,7 @@
cd $WORKSPACE/ci
./clean.sh
- shell:
- !include-raw ./joid-deploy.sh
+ !include-raw: ./joid-deploy.sh
########################
# trigger macros
diff --git a/jjb/joid/joid-deploy.sh b/jjb/joid/joid-deploy.sh
index 59c66e418..e23afac1c 100644
--- a/jjb/joid/joid-deploy.sh
+++ b/jjb/joid/joid-deploy.sh
@@ -5,6 +5,19 @@ set -o nounset
PWD_FILENAME="passwords.sh"
##
+##
+##
+function exit_on_error {
+ RES=$1
+ MSG=$2
+ if [ $RES != 0 ]; then
+ echo "FAILED - $MSG"
+ exit $RES
+ fi
+}
+
+
+##
## Create LAB_CONFIG folder if not exists
##
mkdir -p $LAB_CONFIG
@@ -16,6 +29,10 @@ mkdir -p $LAB_CONFIG
if [ -e "$LAB_CONFIG/$PWD_FILENAME" ]; then
echo "------ Load local passwords ------"
source $LAB_CONFIG/$PWD_FILENAME
+else
+ export MAAS_USER=ubuntu
+ export MAAS_PASSWORD=ubuntu
+ export OS_ADMIN_PASSWORD=openstack
fi
##
@@ -41,19 +58,11 @@ if [ -e "$LAB_CONFIG/environments.yaml" ] && [ "$MAAS_REINSTALL" == "false" ]; t
else
MAASCONFIG=$WORKSPACE/ci/maas/${POD/-*}/${POD/*-}/deployment.yaml
echo "------ Set MAAS password ------"
- if [ -n "$MAAS_USER" ]; then
- sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG
- fi
- if [ -n "$MAAS_PASSWORD" ]; then
- sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG
- fi
+ sed -i -- "s/user: ubuntu/user: $MAAS_USER/" $MAASCONFIG
+ sed -i -- "s/password: ubuntu/password: $MAAS_PASSWORD/" $MAASCONFIG
echo "------ Redeploy MAAS ------"
./02-maasdeploy.sh $POD_NAME
- RES=$?
- if [ $RES != 0 ]; then
- echo "MAAS Deploy FAILED"
- exit $RES
- fi
+ exit_on_error $? "MAAS Deploy FAILED"
fi
##
@@ -70,14 +79,14 @@ fi
# Modify files
echo "------ Set openstack password ------"
-if [ -n "$OS_ADMIN_PASSWORD" ]; then
- sed -i -- "s/\"admin-password\": openstack/\"admin-password\": $OS_ADMIN_PASSWORD/" $SRCBUNDLE
-fi
+sed -i -- "s/\"admin-password\": openstack/\"admin-password\": $OS_ADMIN_PASSWORD/" $SRCBUNDLE
echo "------ Set ceph disks ------"
+CEPH_DISKS_CONTROLLERS=${CEPH_DISKS_CONTROLLERS:-}
if [ -z "$CEPH_DISKS_CONTROLLERS" ]; then
CEPH_DISKS_CONTROLLERS=$CEPH_DISKS
fi
+
#Find the first line of osd-devices to change the one for ceph, then the other for ceph-osd
CEPH_DEV_LINE=$(grep -nr osd-devices $SRCBUNDLE |head -n1|cut -d: -f1)
sed -i -- "${CEPH_DEV_LINE}s@osd-devices: /srv@osd-devices: $CEPH_DISKS@" $SRCBUNDLE
@@ -92,11 +101,7 @@ echo "------ Deploy with juju ------"
echo "Execute: ./deploy.sh -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME"
./deploy.sh -t $HA_MODE -o $OS_RELEASE -s $SDN_CONTROLLER -l $POD_NAME
-RES=$?
-if [ $RES != 0 ]; then
- echo "Deploy FAILED"
- exit $RES
-fi
+exit_on_error $? "Main deploy FAILED"
##
## Set Admin RC
@@ -141,10 +146,39 @@ curl -i -sw '%{http_code}' -H "Content-Type: application/json" -d "
}
}
}" http://$KEYSTONE:5000/v3/auth/tokens |grep "HTTP/1.1 20" 2>&1 >/dev/null;
-RES=$?
-if [ $RES == 0 ]; then
- echo "Deploy SUCCESS"
+exit_on_error $? "Deploy FAILED to auth to openstack"
+
+
+##
+## Create external network if needed
+##
+
+EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-}
+# split EXTERNAL_NETWORK=name;type;first ip;last ip; gateway;network
+IFS=';' read -r -a EXTNET <<< "$EXTERNAL_NETWORK"
+EXTNET_NAME=${EXTNET[0]}
+EXTNET_TYPE=${EXTNET[1]}
+EXTNET_FIP=${EXTNET[2]}
+EXTNET_LIP=${EXTNET[3]}
+EXTNET_GW=${EXTNET[4]}
+EXTNET_NET=${EXTNET[5]}
+# If we have more information than only the name, try to create it
+if [ -z "$EXTNET_TYPE" ]; then
+ echo "------ No data for external network creation, pass ------"
else
- echo "Deploy FAILED to auth to openstack"
+ echo "------ External network creation ------"
+ neutron net-create $EXTNET_NAME --router:external True \
+ --provider:physical_network external --provider:network_type $EXTNET_TYPE
+ exit_on_error $? "External network creation failed"
+ neutron subnet-create $EXTNET_NAME --name $EXTNET_NAME \
+ --allocation-pool start=$EXTNET_FIP,end=$EXTNET_LIP \
+ --disable-dhcp --gateway $EXTNET_GW $EXTNET_NET
+ exit_on_error $? "External subnet creation failed"
fi
-exit $RES
+
+##
+## Exit success
+##
+
+echo "Deploy success"
+exit 0
diff --git a/jjb/opnfv/installer-params.yml b/jjb/opnfv/installer-params.yml
index 876cb1f2b..4980889fd 100644
--- a/jjb/opnfv/installer-params.yml
+++ b/jjb/opnfv/installer-params.yml
@@ -99,13 +99,17 @@
description: 'OpenStack release (kilo|liberty)'
- string:
name: EXTERNAL_NETWORK
- default: 'net04_ext'
- description: 'external network for test'
+ default: ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24
+ description: "External network to create (name;type;first ip;last ip; gateway;network)"
- string:
name: CEPH_DISKS
default: '/srv'
description: "Disks to use by ceph by default (space separated list)"
- string:
+ name: CEPH_DISKS_CONTROLLERS
+ default: ''
+ description: "Disks to use by ceph by controllers (empty if same as CEPH_DISKS)"
+ - string:
name: LAB_CONFIG
default: "$HOME/joid_config"
description: "Local lab config and Openstack openrc location"
diff --git a/jjb/opnfv/slave-params.yml b/jjb/opnfv/slave-params.yml
index 387038245..734343d88 100644
--- a/jjb/opnfv/slave-params.yml
+++ b/jjb/opnfv/slave-params.yml
@@ -194,6 +194,43 @@
description: 'Git URL to use on this Jenkins Slave'
- parameter:
+ name: 'ericsson-build-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - ericsson-build
+ default-slaves:
+ - ericsson-build
+ - string:
+ name: INSTALLER_VERSION
+ default: stable
+ description: 'Version of the installer to deploy'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+- parameter:
+ name: 'huawei-build-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - huawei-build
+ default-slaves:
+ - huawei-build
+ - string:
+ name: INSTALLER_VERSION
+ default: stable
+ description: 'Version of the installer to deploy'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+
+- parameter:
name: 'huawei-us-deploy-bare-1-defaults'
parameters:
- node:
@@ -211,6 +248,24 @@
name: GIT_BASE
default: https://gerrit.opnfv.org/gerrit/$PROJECT
description: 'Git URL to use on this Jenkins Slave'
+- parameter:
+ name: 'huawei-deploy-vm-defaults'
+ parameters:
+ - node:
+ name: SLAVE_NAME
+ description: 'Slave name on Jenkins'
+ allowed-slaves:
+ - huawei-deploy-vm
+ default-slaves:
+ - huawei-deploy-vm
+ - string:
+ name: INSTALLER_VERSION
+ default: stable
+ description: 'Version of the installer to deploy'
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
- parameter:
name: 'opnfv-build-defaults'
@@ -319,6 +374,10 @@
name: CEPH_DISKS_CONTROLLERS
default: /dev/sdb
description: "Disks to use by ceph on controler nodes (space separated list)"
+ - string:
+ name: EXTERNAL_NETWORK
+ default: ext-net;flat;161.105.231.2;161.105.231.62;161.105.231.1;161.105.231.0/26
+ description: "External network to create (name;type;first ip;last ip; gateway;network)"
- parameter:
name: 'orange-test1-defaults'
@@ -372,4 +431,3 @@
name: SSH_KEY
default: /root/.ssh/id_rsa
description: 'SSH key to use for Apex'
-
diff --git a/jjb/qtip/qtip.yml b/jjb/qtip/qtip.yml
index f211763af..c442c6cd9 100644
--- a/jjb/qtip/qtip.yml
+++ b/jjb/qtip/qtip.yml
@@ -12,8 +12,8 @@
node: 'dell-us-testing-bm-1'
installer_type: 'fuel'
installer_ip: '10.20.0.2'
- - dell-us-deploying-bm-3:
- node: 'dell-us-deploying-bm-3'
+ - dell-us-deploying-bm3:
+ node: 'dell-us-deploying-bm3'
installer_type: 'fuel'
installer_ip: '10.20.0.2'
@@ -136,7 +136,7 @@
name: qtip-run-suite
builders:
- shell: |
- #! /bin/bash
+ #!/bin/bash
QTIP_REPO=/home/opnfv/repos/qtip
docker exec -t ${container_id} $QTIP_REPO/docker/run_qtip.sh
@@ -145,34 +145,34 @@
name: qtip-cleanup
builders:
- shell: |
- #! /bin/bash
-
- echo "Cleaning up QTIP docker containers/images..."
- # Remove previous running containers if exist
- if [[ ! -z $(docker ps -a | grep opnfv/qtip) ]]; then
- echo "Removing existing opnfv/qtip containers..."
- running_containers= $(docker ps | grep opnfv/qtip | awk '{print $1}')
- docker stop ${running_containers}
- all_containers= $(docker ps -a | grep opnfv/qtip | awk '{print $1}')
- docker rm ${all_containers}
- fi
-
- # Remove existing images if exist
- if [[ ! -z $(docker images | grep opnfv/qtip) ]]; then
- echo "Docker images to remove:"
- docker images | head -1 && docker images | grep opnfv/qtip
- image_tags=($(docker images | grep opnfv/qtip | awk '{print $2}'))
- for tag in "${image_tags[@]}"; do
- echo "Removing docker image opnfv/qtip:$tag..."
- docker rmi opnfv/qtip:$tag
- done
- fi
+ #!/bin/bash
+
+ echo "Cleaning up QTIP docker containers/images..."
+ # Remove previous running containers if exist
+ if [[ ! -z $(docker ps -a | grep opnfv/qtip) ]]; then
+ echo "Removing existing opnfv/qtip containers..."
+ running_containers= $(docker ps | grep opnfv/qtip | awk '{print $1}')
+ docker stop ${running_containers}
+ all_containers= $(docker ps -a | grep opnfv/qtip | awk '{print $1}')
+ docker rm ${all_containers}
+ fi
+
+ # Remove existing images if exist
+ if [[ ! -z $(docker images | grep opnfv/qtip) ]]; then
+ echo "Docker images to remove:"
+ docker images | head -1 && docker images | grep opnfv/qtip
+ image_tags=($(docker images | grep opnfv/qtip | awk '{print $2}'))
+ for tag in "${image_tags[@]}"; do
+ echo "Removing docker image opnfv/qtip:$tag..."
+ docker rmi opnfv/qtip:$tag
+ done
+ fi
- builder:
name: qtip-fetch-os-cred
builders:
- shell: |
-
+ #!/bin/bash
echo $HOME
echo $WORKSPACE
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index 15ba405f1..87485c44f 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -29,6 +29,9 @@
- intel-pod5:
installer: joid
<<: *brahmaputra
+ - huawei-us-deploy-bare-1:
+ installer: compass
+ <<: *brahmaputra
#--------------------------------
# master
#--------------------------------
@@ -41,7 +44,7 @@
- intel-pod6:
installer: joid
<<: *master
- - huawei-us-deploy-bare-1:
+ - intel-pod8:
installer: compass
<<: *master
- zte-build-1:
@@ -176,6 +179,14 @@
description: 'Arguments to use in order to choose the backend DB'
- parameter:
+ name: 'yardstick-params-intel-pod8'
+ parameters:
+ - string:
+ name: YARDSTICK_DB_BACKEND
+ default: ''
+ description: 'Arguments to use in order to choose the backend DB'
+
+- parameter:
name: 'yardstick-params-ericsson-pod1'
parameters:
- string: