Merge "[VOL-3780] Moving all periodic BBSim based jobs to use the same pipeline"
diff --git a/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy b/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
index ce62507..5cb38ed 100644
--- a/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/master/periodic-bbsim-tests.groovy
@@ -23,67 +23,70 @@
def clusterName = "kind-ci"
-def execute_test(testTarget, workflow, testSpecificHelmFlags = "") {
+def execute_test(testTarget, workflow, teardown, testSpecificHelmFlags = "") {
def infraNamespace = "default"
def volthaNamespace = "voltha"
def robotLogsDir = "RobotLogs"
stage('Cleanup') {
- timeout(15) {
- script {
- helmTeardown(["default", infraNamespace, volthaNamespace])
- }
- timeout(1) {
- sh returnStdout: false, script: '''
- # remove orphaned port-forward from different namespaces
- ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
- '''
+ if (teardown) {
+ timeout(15) {
+ script {
+ helmTeardown(["default", infraNamespace, volthaNamespace])
+ }
+ timeout(1) {
+ sh returnStdout: false, script: '''
+ # remove orphaned port-forward from different namespaces
+ ps aux | grep port-forw | grep -v grep | awk '{print $2}' | xargs --no-run-if-empty kill -9
+ '''
+ }
}
}
}
stage('Deploy Voltha') {
- timeout(20) {
- script {
+ if (teardown) {
+ timeout(20) {
+ script {
- // if we're downloading a voltha-helm-charts patch, then install from a local copy of the charts
- def localCharts = false
- if (volthaHelmChartsChange != "") {
- localCharts = true
+ // if we're downloading a voltha-helm-charts patch, then install from a local copy of the charts
+ def localCharts = false
+ if (volthaHelmChartsChange != "") {
+ localCharts = true
+ }
+
+ // NOTE temporary workaround expose ONOS node ports
+ def localHelmFlags = extraHelmFlags + " --set onos-classic.onosSshPort=30115 " +
+ " --set onos-classic.onosApiPort=30120 " +
+ " --set onos-classic.onosOfPort=31653 " +
+ " --set onos-classic.individualOpenFlowNodePorts=true " + testSpecificHelmFlags
+ volthaDeploy([
+ infraNamespace: infraNamespace,
+ volthaNamespace: volthaNamespace,
+ workflow: workflow.toLowerCase(),
+ extraHelmFlags: localHelmFlags,
+ localCharts: localCharts,
+ bbsimReplica: olts.toInteger(),
+ dockerRegistry: registry,
+ ])
}
-
- // NOTE temporary workaround expose ONOS node ports
- def localHelmFlags = extraHelmFlags + " --set global.log_level=DEBUG --set onos-classic.onosSshPort=30115 " +
- " --set onos-classic.onosApiPort=30120 " +
- " --set onos-classic.onosOfPort=31653 " +
- " --set onos-classic.individualOpenFlowNodePorts=true " + testSpecificHelmFlags
- volthaDeploy([
- infraNamespace: infraNamespace,
- volthaNamespace: volthaNamespace,
- workflow: workflow.toLowerCase(),
- extraHelmFlags: localHelmFlags,
- localCharts: localCharts,
- bbsimReplica: olts.toInteger(),
- dockerRegistry: "mirror.registry.opennetworking.org"
- ])
}
// start logging
sh """
- mkdir -p $WORKSPACE/${testTarget}
+ mkdir -p $WORKSPACE/${testTarget}-components
_TAG=kail-${workflow} kail -n infra -n voltha > $WORKSPACE/${testTarget}-components/onos-voltha-combined.log &
"""
sh """
- JENKINS_NODE_COOKIE="dontKillMe" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${volthaNamespace} svc/voltha-voltha-api 55555:55555; done"&
- JENKINS_NODE_COOKIE="dontKillMe" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-etcd 2379:2379; done"&
- JENKINS_NODE_COOKIE="dontKillMe" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-kafka 9092:9092; done"&
+ JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-voltha-api" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${volthaNamespace} svc/voltha-voltha-api 55555:55555; done"&
+ JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-infra-etcd" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-etcd 2379:2379; done"&
+ JENKINS_NODE_COOKIE="dontKillMe" _TAG="voltha-infra-kafka" bash -c "while true; do kubectl port-forward --address 0.0.0.0 -n ${infraNamespace} svc/voltha-infra-kafka 9092:9092; done"&
ps aux | grep port-forward
"""
- getPodsInfo("$WORKSPACE/${testTarget}-components")
}
}
stage('Run test ' + testTarget + ' on ' + workflow + ' workFlow') {
sh """
mkdir -p $WORKSPACE/${robotLogsDir}/${testTarget}-robot
export ROBOT_MISC_ARGS="-d $WORKSPACE/${robotLogsDir}/${testTarget}-robot "
- ROBOT_MISC_ARGS+="-v ONOS_SSH_PORT:30115 -v ONOS_REST_PORT:30120"
+ ROBOT_MISC_ARGS+="-v ONOS_SSH_PORT:30115 -v ONOS_REST_PORT:30120 -v INFRA_NAMESPACE:${infraNamespace}"
export KVSTOREPREFIX=voltha/voltha_voltha
make -C $WORKSPACE/voltha-system-tests ${testTarget} || true
@@ -98,6 +101,7 @@
done
fi
"""
+ getPodsInfo("$WORKSPACE/${testTarget}-components")
}
}
@@ -174,8 +178,9 @@
def target = test["target"]
def workflow = test["workflow"]
def flags = test["flags"]
+ def teardown = test["teardown"].toBoolean()
println "Executing test ${target} on workflow ${workflow} with extra flags ${flags}"
- execute_test(target, workflow, flags)
+ execute_test(target, workflow, teardown, flags)
}
}
}
diff --git a/jjb/pipeline/voltha-DMI-bbsim-tests.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-DMI-bbsim-tests.groovy
similarity index 100%
rename from jjb/pipeline/voltha-DMI-bbsim-tests.groovy
rename to jjb/pipeline/voltha/voltha-2.7/voltha-DMI-bbsim-tests.groovy
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-bbsim-tests.groovy
similarity index 100%
rename from jjb/pipeline/voltha-bbsim-tests.groovy
rename to jjb/pipeline/voltha/voltha-2.7/voltha-bbsim-tests.groovy
diff --git a/jjb/pipeline/voltha-go-multi-tests.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-go-multi-tests.groovy
similarity index 100%
rename from jjb/pipeline/voltha-go-multi-tests.groovy
rename to jjb/pipeline/voltha/voltha-2.7/voltha-go-multi-tests.groovy
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-go-tests.groovy
similarity index 100%
rename from jjb/pipeline/voltha-go-tests.groovy
rename to jjb/pipeline/voltha/voltha-2.7/voltha-go-tests.groovy
diff --git a/jjb/pipeline/voltha-nightly-tests-bbsim.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-nightly-tests-bbsim.groovy
similarity index 100%
rename from jjb/pipeline/voltha-nightly-tests-bbsim.groovy
rename to jjb/pipeline/voltha/voltha-2.7/voltha-nightly-tests-bbsim.groovy
diff --git a/jjb/pipeline/voltha-system-test-bbsim.groovy b/jjb/pipeline/voltha/voltha-2.7/voltha-system-test-bbsim.groovy
similarity index 100%
rename from jjb/pipeline/voltha-system-test-bbsim.groovy
rename to jjb/pipeline/voltha/voltha-2.7/voltha-system-test-bbsim.groovy
diff --git a/jjb/verify/kind-voltha.yaml b/jjb/verify/kind-voltha.yaml
index f90f16f..cf7e1ff 100644
--- a/jjb/verify/kind-voltha.yaml
+++ b/jjb/verify/kind-voltha.yaml
@@ -17,10 +17,7 @@
- 'make-unit-test':
unit-test-targets: 'test'
junit-allow-empty-results: true
- # Remove kind-voltha test on master once we are not depending on it anymore
- 'voltha-patch-test':
- pipeline-script: 'voltha-bbsim-tests.groovy'
- - 'voltha-patch-test':
- pipeline-script: 'voltha-bbsim-tests.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-bbsim-tests.groovy'
name-extension: '-2.7'
override-branch: 'voltha-2.7'
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 40c4de5..edd3412 100755
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -21,41 +21,63 @@
make-target-reconciletttest: reconcile-openonu-go-adapter-test-tt
jobs:
- - 'voltha-periodic-test-kind-voltha-based':
+ - 'voltha-periodic-test':
name: 'periodic-voltha-test-bbsim'
- pipeline-script: 'voltha-nightly-tests-bbsim.groovy'
- build-node: 'qct-pod4-node2'
- make-target: functional-single-kind
- make-target-failtest: bbsim-failurescenarios
- make-target-errortest: bbsim-errorscenarios
- make-target-alarmtest: bbsim-alarms-kind
- make-target-multipleolt: bbsim-multiolt-kind
- withAlarms: true
code-branch: 'master'
- olts: 1
- onus: 2
- pons: 2
+ extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onu=2,pon=2'
time-trigger: "H H/23 * * *"
-
- - 'voltha-periodic-test-kind-voltha-based':
- name: 'periodic-voltha-multiple-olts-test-bbsim'
- pipeline-script: 'voltha-nightly-tests-bbsim.groovy'
+ # NOTE why not a remote executor?
build-node: 'qct-pod4-node2'
- make-target: functional-multi-olt
- make-target-failtest: bbsim-multiolt-failurescenarios
- make-target-errortest: bbsim-multiolt-errorscenarios
- make-target-alarmtest: bbsim-alarms-kind
- make-target-multipleolt: bbsim-multiolt-kind
- withAlarms: false
+ registry: 'registry.menlo.onlab.us'
+ volthaSystemTestsChange: refs/changes/92/24492/1
+ testTargets: |
+ - target: functional-single-kind
+ workflow: att
+ flags: ""
+ teardown: true
+ - target: bbsim-alarms-kind
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: bbsim-failurescenarios
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: bbsim-errorscenarios
+ workflow: att
+ flags: ""
+ teardown: false
+
+ - 'voltha-periodic-test':
+ name: 'periodic-voltha-multiple-olts-test-bbsim'
+ # NOTE why not a remote executor?
+ build-node: 'qct-pod4-node2'
+ registry: 'registry.menlo.onlab.us'
code-branch: 'master'
olts: 2
- onus: 2
- pons: 2
+ extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onu=2,pon=2'
time-trigger: "H H/23 * * *"
+ testTargets: |
+ - target: functional-multi-olt
+ workflow: att
+ flags: ""
+ teardown: true
+ - target: bbsim-multiolt-failurescenarios
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: bbsim-multiolt-errorscenarios
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: bbsim-multiolt-kind
+ workflow: att
+ flags: ""
+ teardown: false
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-multiple-olts-test-bbsim-2.7'
- pipeline-script: 'voltha-nightly-tests-bbsim.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-nightly-tests-bbsim.groovy'
build-node: 'qct-pod4-node2'
make-target: functional-multi-olt
make-target-failtest: bbsim-multiolt-failurescenarios
@@ -69,6 +91,7 @@
pons: 2
time-trigger: "H H * * *"
+ # openonu Go periodic tests
- 'voltha-periodic-test':
name: 'periodic-voltha-openonu-go-test-bbsim'
code-branch: 'master'
@@ -78,24 +101,31 @@
- target: openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: 1t4gem-openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: 1t8gem-openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: mib-upload-templating-openonu-go-adapter-test
workflow: att
flags: "--set pon=2,onu=2,controlledActivation=only-onu"
+ teardown: true
- target: reconcile-openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-test-dt
workflow: dt
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-test-tt
workflow: tt
flags: ""
+ teardown: true
- 'voltha-periodic-test':
name: 'patchset-voltha-openonu-go-test-bbsim'
@@ -108,24 +138,31 @@
- target: openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: 1t4gem-openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: 1t8gem-openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: mib-upload-templating-openonu-go-adapter-test
workflow: att
flags: "--set pon=2,onu=2,controlledActivation=only-onu"
+ teardown: true
- target: reconcile-openonu-go-adapter-test
workflow: att
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-test-dt
workflow: dt
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-test-tt
workflow: tt
flags: ""
+ teardown: true
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-openonu-go-test-bbsim-2.7'
@@ -152,21 +189,27 @@
- target: openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: 1t4gem-openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: 1t8gem-openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-multi-olt-test-dt
workflow: dt
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-multi-olt-test-tt
workflow: tt
flags: ""
+ teardown: true
time-trigger: "H H/12 * * *"
- 'voltha-periodic-test':
@@ -176,28 +219,33 @@
extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
gerrit-project: '$GERRIT_PROJECT'
gerritRefspec: '$GERRIT_REFSPEC'
+ extraHelmFlags: '--set onu=2,pon=2'
testTargets: |
- target: openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: 1t4gem-openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: 1t8gem-openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-multi-olt-test
workflow: att
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-multi-olt-test-dt
workflow: dt
flags: ""
+ teardown: true
- target: reconcile-openonu-go-adapter-multi-olt-test-tt
workflow: tt
flags: ""
+ teardown: true
olts: 2
- onus: 2
- pons: 2
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-multiple-olts-openonu-go-test-bbsim-2.7'
@@ -216,18 +264,23 @@
pons: 2
time-trigger: "H H/23 * * *"
- - 'voltha-periodic-test-kind-voltha-based':
+ - 'voltha-periodic-test':
name: 'periodic-voltha-test-DMI'
- pipeline-script: 'voltha-DMI-bbsim-tests.groovy'
+ # NOTE why not a remote executor?
build-node: 'qct-pod4-node2'
- make-target: bbsim-dmi-hw-management-test
- withAlarms: false
+ registry: 'registry.menlo.onlab.us'
+ extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
code-branch: 'master'
time-trigger: "H H/23 * * *"
+ testTargets: |
+ - target: bbsim-dmi-hw-management-test
+ workflow: att
+ flags: ""
+ teardown: true
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-test-DMI-2.7'
- pipeline-script: 'voltha-DMI-bbsim-tests.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-DMI-bbsim-tests.groovy'
build-node: 'qct-pod4-node2'
make-target: bbsim-dmi-hw-management-test
withAlarms: false
@@ -236,7 +289,7 @@
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-test-bbsim-2.7'
- pipeline-script: 'voltha-nightly-tests-bbsim.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-nightly-tests-bbsim.groovy'
build-node: 'qct-pod4-node2'
make-target: functional-single-kind
make-target-failtest: bbsim-failurescenarios
@@ -248,19 +301,21 @@
pons: 2
time-trigger: "H H * * *"
- - 'voltha-periodic-test-kind-voltha-based':
+ - 'voltha-periodic-test':
name: 'periodic-voltha-etcd-test'
- pipeline-script: 'voltha-system-test-bbsim.groovy'
build-node: 'ubuntu18.04-basebuild-4c-8g'
code-branch: 'master'
- make-target: sanity-multi-kind
- onus: 2
- pons: 2
+ extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master --set onu=2,pon=2'
time-trigger: "H H/12 * * *"
+ testTargets: |
+ - target: sanity-multi-kind
+ workflow: att
+ flags: ""
+ teardown: true
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-etcd-test-2.7'
- pipeline-script: 'voltha-system-test-bbsim.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-system-test-bbsim.groovy'
build-node: 'ubuntu18.04-basebuild-4c-8g'
code-branch: 'voltha-2.7'
make-target: sanity-multi-kind
@@ -268,21 +323,39 @@
pons: 2
time-trigger: "H H/12 * * *"
-
- - 'voltha-periodic-test-kind-voltha-based':
+ - 'voltha-periodic-test':
name: 'periodic-voltha-sanity-test-multi-runs'
- pipeline-script: 'voltha-go-multi-tests.groovy'
+ # NOTE why not a remote executor?
build-node: 'qct-pod4-node2'
+ registry: 'registry.menlo.onlab.us'
code-branch: 'master'
- make-target: sanity-kind
- onus: 1
- pons: 1
- test-runs: 5
time-trigger: "H H/23 * * *"
+ extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
+ testTargets: |
+ - target: sanity-kind
+ workflow: att
+ flags: ""
+ teardown: true
+ - target: sanity-kind
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: sanity-kind
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: sanity-kind
+ workflow: att
+ flags: ""
+ teardown: false
+ - target: sanity-kind
+ workflow: att
+ flags: ""
+ teardown: false
- 'voltha-periodic-test-kind-voltha-based':
name: 'periodic-voltha-sanity-test-multi-runs-2.7'
- pipeline-script: 'voltha-go-multi-tests.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-go-multi-tests.groovy'
build-node: 'qct-pod4-node2'
code-branch: 'voltha-2.7'
make-target: sanity-kind
@@ -291,15 +364,17 @@
test-runs: 5
time-trigger: "H H/23 * * *"
- - 'voltha-periodic-test-kind-voltha-based':
+ - 'voltha-periodic-test':
name: 'nightly-voltha-DTflow-sanity-test'
build-node: 'ubuntu18.04-basebuild-4c-8g'
code-branch: 'master'
- make-target: sanity-kind-dt
- onus: 1
- pons: 1
time-trigger: "@daily"
- work-flow: DT
+ extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
+ testTargets: |
+ - target: sanity-kind-dt
+ workflow: dt
+ flags: ""
+ teardown: true
# Per-patchset Pod builds on Tucson pod (master)
- 'verify_physical_voltha_patchset_auto':
@@ -378,14 +453,13 @@
name: '{name}'
pipeline-script: 'voltha/master/periodic-bbsim-tests.groovy'
build-node: 'ubuntu18.04-basebuild-8c-15g'
- test-runs: 1
robot-args: ''
gerrit-project: ''
gerritRefspec: ''
- work-flow: ''
volthaSystemTestsChange: ''
volthaHelmChartsChange: ''
extraHelmFlags: ''
+ registry: mirror.registry.opennetworking.org
sandbox: true
olts: 1
@@ -415,7 +489,7 @@
- string:
name: extraHelmFlags
- default: '--set onu={onus},pon={pons},{extraHelmFlags}'
+ default: '{extraHelmFlags}'
description: 'Helm flags (passed to each deployment)'
# test configuration
@@ -426,6 +500,7 @@
# - target: openonu-go-adapter-test
# workflow: att
# flags: ""
+ # teardown: true
- text:
name: testTargets
default: '{testTargets}'
@@ -466,6 +541,11 @@
default: '{olts}'
description: 'How many BBSim instances to run'
+ - string:
+ name: registry
+ default: '{registry}'
+ description: 'Which registry to use (amazon vs menlo)'
+
project-type: pipeline
concurrent: true
@@ -496,7 +576,7 @@
- job-template:
id: 'voltha-periodic-test-kind-voltha-based'
name: '{name}'
- pipeline-script: 'voltha-go-tests.groovy'
+ pipeline-script: 'voltha/voltha-2.7/voltha-go-tests.groovy'
test-runs: 1
robot-args: ''
gerrit-project: ''
@@ -706,7 +786,7 @@
- string:
name: extraHelmFlags
default: '{extraHelmFlags}'
- description: 'Helm flags to pass to ./voltha up'
+ description: 'Helm flags to pass to every helm command'
- string:
name: volthaSystemTestsChange
@@ -960,7 +1040,6 @@
- branch-compare-type: REG_EXP
branch-pattern: '{branch-pattern}'
-
- job-template:
name: '{name}'
id: verify_physical_voltha_patchset_manual
@@ -1017,7 +1096,6 @@
- branch-compare-type: REG_EXP
branch-pattern: '{branch-pattern}'
-
- job-template:
name: '{name}'
id: build_physical_voltha_manual