Create Jenkins job for BBSim scale test
Change-Id: I8f85822338cdf2f22cda5bde3014b4a7f842f5d3
diff --git a/jjb/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index 3af8bd9..916e037 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -25,7 +25,21 @@
options {
timeout(time: 40, unit: 'MINUTES')
}
-
+ environment {
+ KUBECONFIG="$HOME/.kube/kind-config-voltha-minimal"
+ VOLTCONFIG="$HOME/.volt/config-minimal"
+ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$WORKSPACE/kind-voltha/bin"
+ TYPE="minimal"
+ FANCY=0
+ WITH_SIM_ADAPTERS="n"
+ WITH_RADIUS="y"
+ WITH_BBSIM="y"
+ DEPLOY_K8S="y"
+ VOLTHA_LOG_LEVEL="DEBUG"
+ CONFIG_SADIS="y"
+ EXTRA_HELM_FLAGS="${params.extraHelmFlags}"
+ ROBOT_MISC_ARGS="-d $WORKSPACE/RobotLogs"
+ }
stages {
stage('Download kind-voltha') {
@@ -40,7 +54,7 @@
steps {
sh """
cd kind-voltha/
- EXTRA_HELM_FLAGS="${params.extraHelmFlags}" VOLTHA_LOG_LEVEL=DEBUG TYPE=minimal WITH_RADIUS=y WITH_BBSIM=y INSTALL_ONOS_APPS=y CONFIG_SADIS=y WITH_SIM_ADAPTERS=n FANCY=0 ./voltha up
+ ./voltha up
"""
}
}
@@ -48,13 +62,9 @@
stage('Run E2E Tests') {
steps {
sh '''
+ rm -rf $WORKSPACE/RobotLogs; mkdir -p $WORKSPACE/RobotLogs
git clone https://gerrit.opencord.org/voltha-system-tests
- cd kind-voltha/
- export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
- export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
- export PATH=$WORKSPACE/kind-voltha/bin:$PATH
- export ROBOT_VAR_FILE=$WORKSPACE/voltha-system-tests/tests/data/${robotVarFile}
- make -C $WORKSPACE/voltha-system-tests sanity-kind || true
+ make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
'''
}
}
@@ -63,15 +73,9 @@
post {
always {
sh '''
- # copy robot logs
- if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs
- cp -r $WORKSPACE/voltha-system-tests/tests/*/*.html ./RobotLogs || true
- cp -r $WORKSPACE/voltha-system-tests/tests/*/*.xml ./RobotLogs || true
+ set +e
cd kind-voltha/
cp install-minimal.log $WORKSPACE/
- export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
- export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
- export PATH=$WORKSPACE/kind-voltha/bin:$PATH
kubectl get pods --all-namespaces -o jsonpath="{range .items[*].status.containerStatuses[*]}{.image}{'\\t'}{.imageID}{'\\n'}" | sort | uniq -c
kubectl get nodes -o wide
kubectl get pods -o wide
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 8ad3297..b9eba3f 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -8,9 +8,22 @@
jobs:
- 'voltha-periodic-test':
- name: 'voltha-system-tests'
+ name: 'periodic-voltha-sanity-test'
pipeline-script: 'voltha-go-tests.groovy'
default-image-tag: 'master'
+ make-target: sanity-multi-kind
+ onus: 2
+ pons: 2
+ time-trigger: "H H/3 * * *"
+
+ - 'voltha-periodic-test':
+ name: 'periodic-voltha-scale-test'
+ pipeline-script: 'voltha-go-tests.groovy'
+ default-image-tag: 'master'
+ make-target: scale-multi-kind
+ onus: 2
+ pons: 8
+ time-trigger: "H H/3 * * *"
# Per-patchset Pod builds on Tucson pod
- 'verify_physical_voltha_patchset':
@@ -61,34 +74,19 @@
description: 'Name of the Jenkins node to run the job on'
- string:
- name: numOnus
- default: '1'
- description: 'Number of onus per pon port'
-
- - string:
- name: emulationMode
- default: '--set emulation_mode=both'
- description: 'Emulation for BBSIM (both|aaa)'
-
- - string:
name: testTimeout
default: '90'
description: 'timeout for olt/onu validations'
- string:
- name: testTags
- default: '-e notready'
- description: 'test tags'
-
- - string:
name: extraHelmFlags
- default: '--set defaults.image_tag={default-image-tag},onu=2,pon=2'
+ default: '--set defaults.image_tag={default-image-tag},onu={onus},pon={pons}'
description: 'Helm flags to pass to ./voltha up'
- string:
- name: robotVarFile
- default: 'bbsim-kind-2x2.yaml'
- description: 'Pod config file to use for tests'
+ name: makeTarget
+ default: '{make-target}'
+ description: 'Makefile target to invoke during test'
project-type: pipeline
concurrent: false
@@ -98,7 +96,7 @@
triggers:
- timed: |
TZ=America/Los_Angeles
- H/30 * * * *
+ {time-trigger}
- job-template:
id: 'voltha-patch-test'