summaryrefslogtreecommitdiffstats
path: root/jjb/compass4nfv
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/compass4nfv')
-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.sh31
-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
12 files changed, 725 insertions, 651 deletions
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..5c5215c50
--- /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: ''
+- trigger:
+ name: 'compass-huawei-us-deploy-bare-1-odl-trigger'
+ triggers:
+ - timed: '0 16 * * *'
+- 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..1e5c62bdd
--- /dev/null
+++ b/jjb/compass4nfv/compass-deploy-bare.sh
@@ -0,0 +1,31 @@
+#!/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 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
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..e5039db59
--- /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"