VOL-2827 Update tests for 2.3 branch
Minor fixes
- bbsim no longer has a `dep` target
- hardware test on ofagent-go
Change-Id: I15ce20f416b7e6976b511427752add95085d96e6
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index a64d6ef..74e9613 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -49,7 +49,7 @@
poll: false,
scm: [$class: 'RepoScm', \
manifestRepositoryUrl: "${params.manifestUrl}", \
- manifestBranch: "${params.manifestBranch}", \
+ manifestBranch: "${params.branch}", \
currentBranch: true, \
destinationDir: 'voltha', \
forceSync: true,
@@ -78,6 +78,14 @@
steps {
sh """
git clone https://github.com/ciena/kind-voltha.git
+
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
cd kind-voltha/
JUST_K8S=y ./voltha up
bash <( curl -sfL https://raw.githubusercontent.com/boz/kail/master/godownloader.sh) -b "$WORKSPACE/kind-voltha/bin"
@@ -117,6 +125,13 @@
stage('Push Images') {
steps {
sh '''
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
if ! [[ "${gerritProject}" =~ ^(voltha-helm-charts|voltha-system-tests)\$ ]]; then
export GOROOT=/usr/local/go
export GOPATH=\$(pwd)
@@ -129,7 +144,14 @@
stage('Deploy Voltha') {
steps {
sh '''
- export EXTRA_HELM_FLAGS="--set log_agent.enabled=False ${extraHelmFlags} "
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
+ export EXTRA_HELM_FLAGS+="--set log_agent.enabled=False ${extraHelmFlags} "
IMAGES=""
if [ "${gerritProject}" = "voltha-go" ]; then
@@ -240,7 +262,15 @@
gzip $WORKSPACE/onos-voltha-combined.log
+
## shut down kind-voltha
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
cd $WORKSPACE/kind-voltha
WAIT_ON_DOWN=y ./voltha down
'''
diff --git a/jjb/pipeline/voltha-physical-build-and-tests.groovy b/jjb/pipeline/voltha-physical-build-and-tests.groovy
index ffb45b6..ddcd69f 100644
--- a/jjb/pipeline/voltha-physical-build-and-tests.groovy
+++ b/jjb/pipeline/voltha-physical-build-and-tests.groovy
@@ -22,9 +22,10 @@
localSadisConfigFile = null
// The pipeline assumes these variables are always defined
-if ( ! params.withPatchset ) {
+if ( params.manualBranch != "" ) {
GERRIT_EVENT_COMMENT_TEXT = ""
GERRIT_PROJECT = ""
+ GERRIT_BRANCH = "${params.manualBranch}"
GERRIT_CHANGE_NUMBER = ""
GERRIT_PATCHSET_NUMBER = ""
}
@@ -76,7 +77,7 @@
poll: false,
scm: [$class: 'RepoScm',
manifestRepositoryUrl: "${params.manifestUrl}",
- manifestBranch: "${params.manifestBranch}",
+ manifestBranch: "${params.branch}",
currentBranch: true,
destinationDir: 'voltha',
forceSync: true,
@@ -90,7 +91,7 @@
stage('Get Patch') {
when {
- expression { params.withPatchset }
+ expression { params.manualBranch != "" }
}
steps {
sh returnStdout: false, script: """
@@ -121,6 +122,14 @@
steps {
sh returnStdout: false, script: """
git clone https://github.com/ciena/kind-voltha.git
+
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
cd kind-voltha/
JUST_K8S=y ./voltha up
"""
@@ -129,10 +138,18 @@
stage('Build and Push Images') {
when {
- expression { params.withPatchset }
+ expression { params.manualBranch != "" }
}
steps {
sh returnStdout: false, script: """
+
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
if ! [[ "${gerritProject}" =~ ^(voltha-system-tests)\$ ]]; then
make -C $WORKSPACE/voltha/${gerritProject} DOCKER_REPOSITORY=voltha/ DOCKER_TAG=citest docker-build
docker images | grep citest
@@ -157,7 +174,14 @@
steps {
script {
sh returnStdout: false, script: """
- export EXTRA_HELM_FLAGS='--set log_agent.enabled=False -f ${localKindVolthaValuesFile} '
+ if [ "${branch}" != "master" ]; then
+ echo "on branch: ${branch}, sourcing kind-voltha/releases/${branch}"
+ source "kind-voltha/releases/${branch}"
+ else
+ echo "on master, using default settings for kind-voltha"
+ fi
+
+ export EXTRA_HELM_FLAGS+='--set log_agent.enabled=False -f ${localKindVolthaValuesFile} '
IMAGES=""
if [ "${gerritProject}" = "voltha-go" ]; then
@@ -283,7 +307,6 @@
steps {
sh returnStdout: false, script: """
cd voltha
- git clone -b ${branch} ${cordRepoUrl}/cord-tester
mkdir -p $WORKSPACE/RobotLogs
# If the Gerrit comment contains a line with "functional tests" then run the full
@@ -301,7 +324,7 @@
stage('After-Test Delay') {
when {
- expression { params.withPatchset }
+ expression { params.manualBranch != "" }
}
steps {
sh returnStdout: false, script: """
diff --git a/jjb/verify/bbsim.yaml b/jjb/verify/bbsim.yaml
index f4e2e13..5b06d42 100644
--- a/jjb/verify/bbsim.yaml
+++ b/jjb/verify/bbsim.yaml
@@ -35,5 +35,5 @@
- 'github-release':
dependency-jobs: 'version-tag'
github-organization: 'opencord'
- release-targets: 'dep release'
+ release-targets: 'release'
artifact-glob: 'release/*'
diff --git a/jjb/verify/voltha-helm-charts.yaml b/jjb/verify/voltha-helm-charts.yaml
index c7389bb..12aad0a 100644
--- a/jjb/verify/voltha-helm-charts.yaml
+++ b/jjb/verify/voltha-helm-charts.yaml
@@ -21,4 +21,3 @@
dependency-jobs: 'verify_voltha-helm-charts_helm-lint'
build-timeout: 20
pipeline-script: 'voltha-bbsim-tests.groovy'
- extra-helm-flags: '--set defaults.image_tag=null,images.onos.tag=4.0.0,images.onos.repository=voltha/voltha-onos'
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 3aeb284..a10fb7d 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -5,6 +5,7 @@
name: voltha-e2e
project-name: '{name}'
+ manualBranch: ''
jobs:
- 'voltha-periodic-test':
@@ -85,20 +86,16 @@
name: 'verify_physical_voltha_patchset_auto'
build-node: 'tucson-pod'
config-pod: 'tucson-pod'
- branch: 'master'
oltDebVersion: 'openolt_asfvolt16.deb'
profile: 'Default'
- withPatchset: true
# Per-patchset Pod builds on Tucson pod
- 'verify_physical_voltha_patchset_manual':
name: 'verify_physical_voltha_patchset_manual'
build-node: 'tucson-pod'
config-pod: 'tucson-pod'
- branch: 'master'
oltDebVersion: 'openolt_asfvolt16.deb'
profile: 'Default'
- withPatchset: true
# Manual build job for Tucson pod
# Allow local testing without disrupting above job
@@ -106,10 +103,9 @@
name: 'build_tucson-pod_manual'
build-node: 'tucson-pod'
config-pod: 'tucson-pod'
- branch: 'master'
+ manualBranch: 'master'
oltDebVersion: 'openolt_asfvolt16.deb'
profile: 'Default'
- withPatchset: false
- job-template:
id: 'voltha-periodic-test'
@@ -229,9 +225,9 @@
description: 'URL to the repo manifest'
- string:
- name: manifestBranch
- default: 'master'
- description: 'Name of the repo branch to use'
+ name: branch
+ default: '$GERRIT_BRANCH'
+ description: 'Name of the branch to use'
- string:
name: gerritProject
@@ -317,9 +313,9 @@
description: 'URL to the repo manifest'
- string:
- name: manifestBranch
- default: master
- description: 'Name of the repo branch to use'
+ name: branch
+ default: '$GERRIT_BRANCH'
+ description: 'Name of the branch to use'
- string:
name: gerritProject
@@ -376,10 +372,6 @@
description: 'OLT Software version to install'
- string:
- name: branch
- default: '{branch}'
-
- - string:
name: profile
default: '{profile}'
description: 'Technology Profile pushed to the ETCD'
@@ -394,10 +386,10 @@
default: true
description: "Re-install OLT software"
- - bool:
- name: withPatchset
- default: true
- description: "Build with Gerrit patchset"
+ - string:
+ name: manualBranch
+ default: '{manualBranch}'
+ description: "If a non-empty string, build manually as a specific branch, not with a specific patchset"
- string:
name: extraRobotArgs
@@ -458,8 +450,8 @@
description: 'URL to the repo manifest'
- string:
- name: manifestBranch
- default: master
+ name: branch
+ default: '$GERRIT_BRANCH'
description: 'Name of the repo branch to use'
- string:
@@ -517,10 +509,6 @@
description: 'OLT Software version to install'
- string:
- name: branch
- default: '{branch}'
-
- - string:
name: profile
default: '{profile}'
description: 'Technology Profile pushed to the ETCD'
@@ -535,10 +523,10 @@
default: true
description: "Re-install OLT software"
- - bool:
- name: withPatchset
- default: true
- description: "Build with Gerrit patchset"
+ - string:
+ name: manualBranch
+ default: '{manualBranch}'
+ description: "If a non-empty string, build manually on a specific branch, not with a specific patchset"
- string:
name: extraRobotArgs
@@ -565,10 +553,10 @@
comment-contains-value: '^hardware test with delay$'
projects:
- project-compare-type: REG_EXP
- project-pattern: '^(voltha-go|voltha-openolt-adapter|voltha-openonu-adapter|voltha-api-server|voltha-system-tests|ofagent-py|voltha-onos)$'
+ project-pattern: '^(voltha-go|voltha-openolt-adapter|voltha-openonu-adapter|voltha-api-server|voltha-system-tests|ofagent-py|ofagent-go|voltha-onos)$'
branches:
- branch-compare-type: PLAIN
- branch-pattern: 'master'
+ branch-pattern: '^(master|voltha-2.3)$'
- job-template:
@@ -600,9 +588,9 @@
description: 'URL to the repo manifest'
- string:
- name: manifestBranch
- default: master
- description: 'Name of the repo branch to use (change to $GERRIT_BRANCH if testing a patchset)'
+ name: branch
+ default: "$GERRIT_BRANCH"
+ description: 'Name of the repo manifest branch to use'
- string:
name: gerritProject
@@ -659,10 +647,6 @@
description: 'OLT Software version to install'
- string:
- name: branch
- default: '{branch}'
-
- - string:
name: profile
default: '{profile}'
description: 'Technology Profile pushed to the ETCD'
@@ -677,10 +661,10 @@
default: false
description: "Re-install OLT software"
- - bool:
- name: withPatchset
- default: false
- description: "Build with Gerrit patchset"
+ - string:
+ name: manualBranch
+ default: '{manualBranch}'
+ description: "If a non-empty string, build manually on a specific branch, not with a specific patchset"
- string:
name: extraRobotArgs