Merge "VOL-2239 Implement new stage for kubernetes system test"
diff --git a/.gitreview b/.gitreview
index 0d8bc3d..923de6d 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,3 +2,4 @@
host=gerrit.opencord.org
port=29418
project=ci-management.git
+defaultremote=origin
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..626cd61
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
+We expect all ONF employees, member companies, and participants to abide by our [Code of Conduct](https://www.opennetworking.org/wp-content/themes/onf/img/onf-code-of-conduct.pdf).
+
+If you are being harassed, notice that someone else is being harassed, or have any other concerns involving someone’s welfare, please notify a member of the ONF team or email [conduct@opennetworking.org](conduct@opennetworking.org).
diff --git a/jjb/cord-test/nightly-build-pipeline.yaml b/jjb/cord-test/nightly-build-pipeline.yaml
index 728ccad..f565c37 100644
--- a/jjb/cord-test/nightly-build-pipeline.yaml
+++ b/jjb/cord-test/nightly-build-pipeline.yaml
@@ -903,9 +903,13 @@
Copyright (c) 2017 Open Networking Foundation (ONF)
<<: *test-pipe-job-boiler-plate
+ pipeline-script: 'voltha-physical-functional-tests.groovy'
+ manifest-url: 'https://gerrit.opencord.org/voltha-test-manifest.git'
+ manifest-branch: 'master'
+
parameters:
- string:
- name: TestNodeName
+ name: buildNode
default: '{testvm}'
description: 'Jenkins node name of TestVM Node'
@@ -947,21 +951,23 @@
- string:
name: branch
default: '{branch}'
+ description: 'Branch of the test libraries to check out'
- string:
- name: notificationEmail
- default: 'you@opennetworking.org, suchitra@opennetworking.org'
- description: ''
+ name: manifestUrl
+ default: '{manifest-url}'
+ description: 'Repo manifest URL for code checkout (so we can display changes in Jenkins)'
+
+ - string:
+ name: manifestBranch
+ default: '{manifest-branch}'
+ description: 'Repo manifest branch for code checkout (so we can display changes in Jenkins)'
+
concurrent: true
- pipeline-scm:
- script-path: '{Jenkinsfile}'
- scm:
- - git:
- url: '{gerrit-server-url}/voltha-system-tests'
- branches:
- - '{branch}'
+ project-type: pipeline
+ dsl: !include-raw-escape: ../pipeline/{pipeline-script}
triggers:
- reverse:
diff --git a/jjb/cord-test/voltha.yaml b/jjb/cord-test/voltha.yaml
index e7062dc..642f738 100644
--- a/jjb/cord-test/voltha.yaml
+++ b/jjb/cord-test/voltha.yaml
@@ -9,22 +9,22 @@
build-timeout: '300'
jobs:
- # flex OCP pod with olt/onu - release voltha master build job
+ # flex OCP pod with olt/onu - manual test job, voltha master build job
- 'build_pod_manual':
testvm: 'qa-testvm-pod'
config-pod: 'flex-ocp-cord'
release: 'master'
branch: 'master'
test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- oltDebVersion: 'openolt-seba-2.0.deb'
- profile: '1T4GEM'
+ Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
+ oltDebVersion: 'openolt_asfvolt16.deb'
+ profile: '1T4GEM-bal31'
# flex pod1 test job - using voltha branch
- 'build_pod_test':
testvm: 'qa-testvm-pod'
config-pod: 'flex-ocp-cord'
- profile: '1T4GEM'
+ profile: '1T4GEM-bal31'
branch: 'master'
test-repo: 'voltha-system-tests'
Jenkinsfile: 'Jenkinsfile-voltha-test'
@@ -57,8 +57,8 @@
branch: 'master'
released: false
test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- oltDebVersion: 'openolt-seba-2.0.deb'
+ Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
+ oltDebVersion: 'openolt_asfvolt16.deb'
configurePod: true
profile: 'Default'
time: '1'
@@ -71,7 +71,6 @@
branch: 'master'
test-repo: 'voltha-system-tests'
profile: 'Default'
- Jenkinsfile: 'Jenkinsfile-voltha-test'
# flex OCP pod with olt/onu - uses 1TCONT/4GEMs tech profile on voltha - timer based job
- 'build_voltha_pod_release':
@@ -81,10 +80,10 @@
branch: 'master'
released: false
test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- oltDebVersion: 'openolt-seba-2.0.deb'
+ Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
+ oltDebVersion: 'openolt_asfvolt16.deb'
configurePod: true
- profile: '1T4GEM'
+ profile: '1T4GEM-bal31'
time: '2'
# flex pod1 test job - test job uses 1TCONT/4GEMs tech profile - using voltha branch
@@ -94,8 +93,7 @@
release: 'master'
branch: 'master'
test-repo: 'voltha-system-tests'
- profile: '1T4GEM'
- Jenkinsfile: 'Jenkinsfile-voltha-test'
+ profile: '1T4GEM-bal31'
# flex OCP pod with olt/onu - Released versions Default tech profile and timer based job
- 'build_voltha_pod_release':
@@ -104,8 +102,8 @@
release: 'release'
branch: 'master'
test-repo: 'voltha-system-tests'
- Jenkinsfile: 'Jenkinsfile-voltha-build'
- oltDebVersion: 'openolt-seba-2.0.deb'
+ Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
+ oltDebVersion: 'openolt_asfvolt16.deb'
configurePod: true
released: true
profile: 'Default'
@@ -119,7 +117,6 @@
branch: 'master'
test-repo: 'voltha-system-tests'
profile: 'Default'
- Jenkinsfile: 'Jenkinsfile-voltha-test'
# Menlo pod with olt/onu - Default tech profile and timer based job
- 'build_voltha_pod_release':
@@ -130,7 +127,7 @@
released: false
test-repo: 'voltha-system-tests'
Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
- oltDebVersion: 'openolt-2.2.deb'
+ oltDebVersion: 'openolt_asfvolt16.deb'
configurePod: true
profile: 'Default'
time: '1'
@@ -143,7 +140,29 @@
branch: 'master'
test-repo: 'voltha-system-tests'
profile: 'Default'
- Jenkinsfile: 'Jenkinsfile-voltha-test'
+
+ # Menlo pod with olt/onu - 1T4GEM tech profile and timer based job
+ - 'build_voltha_pod_release':
+ testvm: 'menlo-demo-pod'
+ config-pod: 'onf-demo-pod'
+ release: 'master'
+ branch: 'master'
+ released: false
+ test-repo: 'voltha-system-tests'
+ Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
+ oltDebVersion: 'openolt_asfvolt16.deb'
+ configurePod: true
+ profile: '1T4GEM-bal31'
+ time: '2'
+
+ # Menlo pod test job - uses tech profile on voltha branch
+ - 'build_voltha_pod_test':
+ testvm: 'menlo-demo-pod'
+ config-pod: 'onf-demo-pod'
+ release: 'master'
+ branch: 'master'
+ test-repo: 'voltha-system-tests'
+ profile: '1T4GEM-bal31'
# Menlo DEMO-POD - 1 1TCONT 4 4GEMs TechProfile - Manual build and test job
- 'build_pod_manual':
@@ -153,16 +172,16 @@
branch: 'master'
test-repo: 'voltha-system-tests'
Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
- oltDebVersion: 'openolt-2.2.deb'
+ oltDebVersion: 'openolt_asfvolt16.deb'
configurePod: true
- profile: '1T4GEM'
+ profile: '1T4GEM-bal31'
- 'build_pod_test':
testvm: 'menlo-demo-pod'
config-pod: 'onf-demo-pod'
branch: 'master'
test-repo: 'voltha-system-tests'
Jenkinsfile: 'Jenkinsfile-voltha-test'
- profile: '1T4GEM'
+ profile: '1T4GEM-bal31'
# Menlo DEMO-POD - Default TechProfile - manual build job
- 'build_pod_manual':
@@ -172,7 +191,7 @@
branch: 'master'
test-repo: 'voltha-system-tests'
Jenkinsfile: 'Jenkinsfile-voltha-bal31-build'
- oltDebVersion: 'openolt-2.2.deb'
+ oltDebVersion: 'openolt_asfvolt16.deb'
configurePod: true
profile: 'Default'
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index af00943..456e7bd 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -86,7 +86,7 @@
# matching repos that should be version tagged by the version-tag job
# (basically the same as imagebuilder projects + helm charts + tools
- version-tag-projects-regexp: '^(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|tt-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter|voltha-lib-go|voltha-python-base)$'
+ version-tag-projects-regexp: '^(xos.*|.*helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|tt-workflow-driver|ves-agent|voltha-bbsim|openolt|sadis-server|kafka-topic-exporter|pyvoltha||plyxproto|voltha-protos|alpine-grpc-base|cordctl|voltha-go|voltha-onos|device-management|cord-workflow.*|voltha-system-tests|openairinterface|omec-.*|bbsim|omci-sim|ponsim|pppoel2relay|voltha-api-server|aaa|config|dhcpl2relay|igmp|igmpproxy|kafka-onos|mcast|olt|sadis|vtn|voltha-.*-adapter|voltha-lib-go|voltha-python-base|mn-stratum-siab|ofagent.*|bng)$'
# PyPI related publishing variables
#
diff --git a/jjb/maven.yaml b/jjb/maven.yaml
index d39c1f6..e72b245 100644
--- a/jjb/maven.yaml
+++ b/jjb/maven.yaml
@@ -54,7 +54,7 @@
pom: pom.xml
settings: 'cord-apps-maven-settings'
settings-type: cfp
- goals: 'clean test install'
+ goals: '-Pci-verify clean test install'
publishers:
- junit:
diff --git a/jjb/pipeline/voltha-bbsim-tests.groovy b/jjb/pipeline/voltha-bbsim-tests.groovy
index 8c5e7f8..7bdb04f 100644
--- a/jjb/pipeline/voltha-bbsim-tests.groovy
+++ b/jjb/pipeline/voltha-bbsim-tests.groovy
@@ -85,7 +85,7 @@
export TYPE=minimal
export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
- export PATH=/w/workspace/${gerritProject}_sanity-system-test/kind-voltha/bin:$PATH
+ export PATH=$WORKSPACE/kind-voltha/bin:$PATH
docker images | grep citest
for image in \$(docker images -f "reference=*/*citest" --format "{{.Repository}}"); do echo "Pushing \$image to nodes"; kind load docker-image \$image:citest --name voltha-\$TYPE --nodes voltha-\$TYPE-worker,voltha-\$TYPE-worker2; done
fi
@@ -143,7 +143,7 @@
cd kind-voltha/
export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
- export PATH=/w/workspace/${gerritProject}_sanity-system-test/kind-voltha/bin:$PATH
+ export PATH=$WORKSPACE/kind-voltha/bin:$PATH
make -C $WORKSPACE/voltha/voltha-system-tests sanity-kind || true
'''
}
@@ -162,7 +162,7 @@
cp install-minimal.log $WORKSPACE/
export KUBECONFIG="$(./bin/kind get kubeconfig-path --name="voltha-minimal")"
export VOLTCONFIG="/home/jenkins/.volt/config-minimal"
- export PATH=/w/workspace/${gerritProject}_sanity-system-test/kind-voltha/bin:$PATH
+ 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/pipeline/voltha-go-tests.groovy b/jjb/pipeline/voltha-go-tests.groovy
index 916e037..5af4195 100644
--- a/jjb/pipeline/voltha-go-tests.groovy
+++ b/jjb/pipeline/voltha-go-tests.groovy
@@ -42,6 +42,25 @@
}
stages {
+ stage('Repo') {
+ steps {
+ step([$class: 'WsCleanup'])
+ checkout(changelog: true,
+ poll: false,
+ scm: [$class: 'RepoScm',
+ manifestRepositoryUrl: "${params.manifestUrl}",
+ manifestBranch: "${params.manifestBranch}",
+ currentBranch: true,
+ destinationDir: 'voltha',
+ forceSync: true,
+ resetFirst: true,
+ quiet: true,
+ jobs: 4,
+ showAllChanges: true]
+ )
+ }
+ }
+
stage('Download kind-voltha') {
steps {
sh """
@@ -62,7 +81,7 @@
stage('Run E2E Tests') {
steps {
sh '''
- rm -rf $WORKSPACE/RobotLogs; mkdir -p $WORKSPACE/RobotLogs
+ mkdir -p $WORKSPACE/RobotLogs
git clone https://gerrit.opencord.org/voltha-system-tests
make -C $WORKSPACE/voltha-system-tests ${makeTarget} || true
'''
@@ -100,10 +119,8 @@
kubectl logs \$pod -n voltha > $WORKSPACE/\$pod.log;
fi
done
- ## clean up node
+ ## shut down voltha
WAIT_ON_DOWN=y ./voltha down
- cd $WORKSPACE/
- rm -rf kind-voltha/ voltha-system-tests/ || true
'''
step([$class: 'RobotPublisher',
disableArchiveOutput: false,
diff --git a/jjb/pipeline/voltha-physical-tests.groovy b/jjb/pipeline/voltha-physical-build-and-tests.groovy
similarity index 91%
rename from jjb/pipeline/voltha-physical-tests.groovy
rename to jjb/pipeline/voltha-physical-build-and-tests.groovy
index 85d1f0f..65e4ae2 100644
--- a/jjb/pipeline/voltha-physical-tests.groovy
+++ b/jjb/pipeline/voltha-physical-build-and-tests.groovy
@@ -60,35 +60,33 @@
localDeploymentConfigFile = "${env.localConfigDir}/${params.deploymentConfigFile}"
localKindVolthaValuesFile = "${env.localConfigDir}/${params.kindVolthaValuesFile}"
localSadisConfigFile = "${env.localConfigDir}/${params.sadisConfigFile}"
- if ( ! params.withPatchset ) {
- sh returnStdout: false, script: """
- mkdir -p voltha
- cd voltha
- git clone -b ${branch} ${cordRepoUrl}/voltha-system-tests
- """
- }
}
}
}
+ stage('Repo') {
+ steps {
+ checkout(changelog: true,
+ poll: false,
+ scm: [$class: 'RepoScm',
+ manifestRepositoryUrl: "${params.manifestUrl}",
+ manifestBranch: "${params.manifestBranch}",
+ currentBranch: true,
+ destinationDir: 'voltha',
+ forceSync: true,
+ resetFirst: true,
+ quiet: true,
+ jobs: 4,
+ showAllChanges: true]
+ )
+ }
+ }
+
stage('Get Patch') {
when {
expression { params.withPatchset }
}
steps {
- checkout(changelog: false, \
- poll: false,
- scm: [$class: 'RepoScm', \
- manifestRepositoryUrl: "${params.manifestUrl}", \
- manifestBranch: "${params.manifestBranch}", \
- currentBranch: true, \
- destinationDir: 'voltha', \
- forceSync: true,
- resetFirst: true, \
- quiet: true, \
- jobs: 4, \
- showAllChanges: true] \
- )
sh returnStdout: false, script: """
cd voltha
PROJECT_PATH=\$(xmllint --xpath "string(//project[@name=\\\"${gerritProject}\\\"]/@path)" .repo/manifest.xml)
@@ -199,7 +197,7 @@
sh returnStdout: false, script: """
etcd_container=\$(kubectl get pods -n voltha | grep voltha-etcd-cluster | awk 'NR==1{print \$1}')
kubectl cp $WORKSPACE/voltha/voltha-system-tests/tests/data/TechProfile-${profile}.json voltha/\$etcd_container:/tmp/flexpod.json
- kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/xgspon/64'
+ kubectl exec -it \$etcd_container -n voltha -- /bin/sh -c 'cat /tmp/flexpod.json | ETCDCTL_API=3 etcdctl put service/voltha/technology_profiles/XGS-PON/64'
"""
}
}
@@ -219,8 +217,8 @@
steps {
script {
deployment_config.olts.each { olt ->
- sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service bal_core_dist stop' || true"
- sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service bal_core_dist stop' || true"
+ sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service openolt stop' || true"
+ sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'killall dev_mgmt_daemon' || true"
sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'dpkg --remove asfvolt16 && dpkg --purge asfvolt16'"
waitUntil {
olt_sw_present = sh returnStdout: true, script: "sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'dpkg --list | grep asfvolt16 | wc -l'"
@@ -246,10 +244,10 @@
deployment_config.olts.each { olt ->
sh returnStdout: true, script: """
ssh-keyscan -H ${olt.ip} >> ~/.ssh/known_hosts
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service bal_core_dist stop' || true
sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service openolt stop' || true
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'rm -f /var/log/bal_core_dist.log /var/log/openolt.log'
- sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service bal_core_dist start &'
+ sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'killall dev_mgmt_daemon' || true
+ sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'rm -f /var/log/openolt.log'
+ sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service dev_mgmt_daemon start &'
sleep 5
sshpass -p ${olt.pass} ssh -l ${olt.user} ${olt.ip} 'service openolt start &'
"""
@@ -310,6 +308,14 @@
fi
done
"""
+ script {
+ deployment_config.olts.each { olt ->
+ sh returnStdout: true, script: """
+ sshpass -p ${olt.pass} scp ${olt.user}@${olt.ip}:/var/log/openolt.log $WORKSPACE/openolt-${olt.ip}.log || true
+ sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.ip}.log # Remove escape sequences
+ """
+ }
+ }
step([$class: 'RobotPublisher',
disableArchiveOutput: false,
logFileName: 'RobotLogs/log*.html',
diff --git a/jjb/pipeline/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha-physical-functional-tests.groovy
new file mode 100644
index 0000000..aa9a782
--- /dev/null
+++ b/jjb/pipeline/voltha-physical-functional-tests.groovy
@@ -0,0 +1,129 @@
+// Copyright 2017-present Open Networking Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+node {
+ // Need this so that deployment_config has global scope when it's read later
+ deployment_config = null
+}
+
+pipeline {
+ /* no label, executor is determined by JJB */
+ agent {
+ label "${params.buildNode}"
+ }
+ options {
+ timeout(time: 60, unit: 'MINUTES')
+ }
+
+ environment {
+ KUBECONFIG="$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf"
+ VOLTCONFIG="$HOME/.volt/config-minimal"
+ PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$WORKSPACE/kind-voltha/bin"
+ }
+
+ stages {
+ stage ('Initialize') {
+ steps {
+ step([$class: 'WsCleanup'])
+ sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
+ script {
+ deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
+ }
+ // This checkout is just so that we can show changes in Jenkins
+ checkout(changelog: true,
+ poll: false,
+ scm: [$class: 'RepoScm',
+ manifestRepositoryUrl: "${params.manifestUrl}",
+ manifestBranch: "${params.manifestBranch}",
+ currentBranch: true,
+ destinationDir: 'voltha',
+ forceSync: true,
+ resetFirst: true,
+ quiet: true,
+ jobs: 4,
+ showAllChanges: true]
+ )
+ sh returnStdout: true, script: """
+ cd voltha
+ git clone -b ${branch} ${cordRepoUrl}/cord-tester
+ git clone -b ${branch} ${cordRepoUrl}/voltha # NOTE do we need the voltha source code??
+ """
+ }
+ }
+ stage('Subscriber Validation and Ping Tests') {
+ environment {
+ ROBOT_CONFIG_FILE="$WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
+ ROBOT_MISC_ARGS="--removekeywords wuks -d $WORKSPACE/RobotLogs -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir}"
+ ROBOT_FILE="Voltha_PODTests.robot"
+ }
+ steps {
+ sh """
+ mkdir -p $WORKSPACE/RobotLogs
+ make -C $WORKSPACE/voltha/voltha-system-tests voltha-test || true
+ """
+ }
+ }
+ }
+
+ post {
+ always {
+ sh returnStdout: true, script: """
+ set +e
+ 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 -n voltha -o wide
+ ## get default pod logs
+ for pod in \$(kubectl get pods --no-headers | awk '{print \$1}');
+ do
+ if [[ \$pod == *"onos"* && \$pod != *"onos-service"* ]]; then
+ kubectl logs \$pod onos> $WORKSPACE/\$pod.log;
+ else
+ kubectl logs \$pod> $WORKSPACE/\$pod.log;
+ fi
+ done
+ ## get voltha pod logs
+ for pod in \$(kubectl get pods --no-headers -n voltha | awk '{print \$1}');
+ do
+ if [[ \$pod == *"-api-"* ]]; then
+ kubectl logs \$pod arouter -n voltha > $WORKSPACE/\$pod.log;
+ else
+ kubectl logs \$pod -n voltha > $WORKSPACE/\$pod.log;
+ fi
+ done
+ """
+ script {
+ deployment_config.olts.each { olt ->
+ sh returnStdout: true, script: """
+ sshpass -p ${olt.pass} scp ${olt.user}@${olt.ip}:/var/log/openolt.log $WORKSPACE/openolt-${olt.ip}.log || true
+ sed -i 's/\\x1b\\[[0-9;]*[a-zA-Z]//g' $WORKSPACE/openolt-${olt.ip}.log # Remove escape sequences
+ """
+ }
+ }
+ step([$class: 'RobotPublisher',
+ disableArchiveOutput: false,
+ logFileName: 'RobotLogs/log*.html',
+ otherFiles: '',
+ outputFileName: 'RobotLogs/output*.xml',
+ outputPath: '.',
+ passThreshold: 100,
+ reportFileName: 'RobotLogs/report*.html',
+ unstableThreshold: 0
+ ]);
+ archiveArtifacts artifacts: '*.log'
+ }
+ unstable {
+ step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
+ }
+ }
+}
diff --git a/jjb/shell/licensecheck.sh b/jjb/shell/licensecheck.sh
index 5bbcdf8..c358294 100755
--- a/jjb/shell/licensecheck.sh
+++ b/jjb/shell/licensecheck.sh
@@ -67,6 +67,7 @@
! -name "*.p12" \
! -name "*.patch" \
! -name "*.pb.go" \
+ ! -name "*.pb.gw.go" \
! -name "*.pdf" \
! -name "*.pcap" \
! -name "*.pem" \
diff --git a/jjb/siab-e2e.yaml b/jjb/siab-e2e.yaml
deleted file mode 100644
index b5b1935..0000000
--- a/jjb/siab-e2e.yaml
+++ /dev/null
@@ -1,83 +0,0 @@
----
-- project:
- name: siab-e2e-att
- project: '{name}'
- build-node: 'qct-pod4-node2'
- branch: 'master'
- refspec: 'refs/heads/master'
- failure-email-address: 'andy@opennetworking.org'
- timed-trigger: '{every-hour}'
- build-timeout: 60
- jobs:
- - 'siab-e2e-att'
-
-- job-template:
- id: 'siab-e2e-att'
- name: 'verify_automation-tools_{project}'
- description: |
- Created by {id} job-template from ci-management/jjb/siab-e2e.yaml
-
- triggers:
- - timed: '{timed-trigger}'
-
- properties:
- - cord-infra-properties:
- build-days-to-keep: '{build-days-to-keep}'
- artifact-num-to-keep: '{artifact-num-to-keep}'
-
- wrappers:
- - lf-infra-wrappers:
- build-timeout: '{build-timeout}'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
- - workspace-cleanup
-
- scm:
- - cord-infra-gerrit-scm:
- git-url: '{gerrit-server-url}/automation-tools'
- refspec: '{refspec}'
- branch: '{branch}'
- submodule-recursive: 'false'
- choosing-strategy: 'gerrit'
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
- basedir: 'cord/automation-tools'
-
- node: '{build-node}'
- project-type: freestyle
- concurrent: false
-
- builders:
- - shell: |
- #!/usr/bin/env bash
- set -eu -o pipefail
-
- cd cord/automation-tools/seba-in-a-box
- [ -e /usr/bin/kubeadm ] && make reset-kubeadm
- make && make run-tests
-
- publishers:
- - email:
- recipients: '{failure-email-address}'
- - postbuildscript:
- builders:
- - role: SLAVE
- build-on:
- - SUCCESS
- - UNSTABLE
- - NOT_BUILT
- - ABORTED
- - FAILURE
- build-steps:
- - shell: sudo rm -rf /tmp/logs/*
- - role: SLAVE
- build-on:
- - FAILURE
- build-steps:
- - shell: |
- #!/usr/bin/env bash
-
- mkdir -p /tmp/logs
- sudo cp /var/log/containers/*.log /tmp/logs
- sudo chown cord /tmp/logs/*.log
- - archive:
- artifacts: '/tmp/logs/*.log'
- allow-empty: true
diff --git a/jjb/verify/bng.yaml b/jjb/verify/bng.yaml
new file mode 100644
index 0000000..34b4aa8
--- /dev/null
+++ b/jjb/verify/bng.yaml
@@ -0,0 +1,18 @@
+---
+# jobs for 'bng' repo
+
+- project:
+ name: bng
+ project: '{name}'
+
+ jobs:
+ - 'bng-jobs':
+ branch-regexp: '^(.*)$'
+
+- job-group:
+ name: 'bng-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject'
+ - 'maven-install'
+ - 'maven-publish'
diff --git a/jjb/verify/mn-stratum-siab.yaml b/jjb/verify/mn-stratum-siab.yaml
new file mode 100644
index 0000000..3056a3a
--- /dev/null
+++ b/jjb/verify/mn-stratum-siab.yaml
@@ -0,0 +1,29 @@
+---
+# verification jobs for 'mn-stratum-siab' repo
+
+- project:
+ name: mn-stratum-siab
+ project: '{name}'
+
+ jobs:
+ - 'verify-mn-stratum-siab-jobs':
+ branch-regexp: '{all-branches-regexp}'
+ - 'publish-mn-stratum-siab-jobs'
+
+- job-group:
+ name: 'verify-mn-stratum-siab-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject'
+ - 'make-unit-test':
+ unit-test-targets: 'test'
+ junit-allow-empty-results: true
+
+- job-group:
+ name: 'publish-mn-stratum-siab-jobs'
+ jobs:
+ - 'docker-publish':
+ build-timeout: 30
+ docker-repo: 'opencord'
+ dependency-jobs: 'version-tag'
+
diff --git a/jjb/verify/ofagent-py.yaml b/jjb/verify/ofagent-py.yaml
new file mode 100644
index 0000000..776661a
--- /dev/null
+++ b/jjb/verify/ofagent-py.yaml
@@ -0,0 +1,27 @@
+---
+# verification jobs for 'ofagent-py' repo
+
+- project:
+ name: ofagent-py
+ project: '{name}'
+
+ jobs:
+ - 'verify-ofagent-py-jobs':
+ branch-regexp: '{all-branches-regexp}'
+ - 'publish-ofagent-py-jobs':
+ branch-regexp: '{all-branches-regexp}'
+
+- job-group:
+ name: 'verify-ofagent-py-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject'
+ - 'make-unit-test':
+ unit-test-keep-going: 'true'
+
+- job-group:
+ name: 'publish-ofagent-py-jobs'
+ jobs:
+ - 'docker-publish':
+ docker-repo: 'voltha'
+ dependency-jobs: 'version-tag'
diff --git a/jjb/verify/voltha-go.yaml b/jjb/verify/voltha-go.yaml
index 0cbb585..a3f7f74 100644
--- a/jjb/verify/voltha-go.yaml
+++ b/jjb/verify/voltha-go.yaml
@@ -22,7 +22,7 @@
build-timeout: 20
dest-gopath: "github.com/opencord"
name-extension: "-lint"
- unit-test-targets: 'lint'
+ unit-test-targets: 'lint sca'
unit-test-keep-going: 'true'
junit-allow-empty-results: true
- 'make-unit-test':
diff --git a/jjb/verify/voltha-helm-charts.yaml b/jjb/verify/voltha-helm-charts.yaml
index a4b7a9d..fd88c24 100644
--- a/jjb/verify/voltha-helm-charts.yaml
+++ b/jjb/verify/voltha-helm-charts.yaml
@@ -21,4 +21,4 @@
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=2.2.0'
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 7ac9609..1486344 100644
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -9,8 +9,9 @@
jobs:
- 'voltha-periodic-test':
name: 'periodic-voltha-sanity-test'
- pipeline-script: 'voltha-go-tests.groovy'
+ build-node: 'qct-pod4-node2'
default-image-tag: 'master'
+ code-branch: 'master'
make-target: sanity-multi-kind
onus: 2
pons: 2
@@ -27,8 +28,9 @@
- 'voltha-periodic-test':
name: 'periodic-voltha-scale-test'
- pipeline-script: 'voltha-go-tests.groovy'
+ build-node: 'qct-pod4-node2'
default-image-tag: 'master'
+ code-branch: 'master'
make-target: scale-multi-kind
onus: 2
pons: 8
@@ -40,8 +42,7 @@
testvm: 'tucson-pod'
config-pod: 'tucson-pod'
branch: 'master'
- pipeline-script: 'voltha-physical-tests.groovy'
- oltDebVersion: 'openolt-seba-2.0.deb'
+ oltDebVersion: 'openolt_asfvolt16.deb'
profile: 'Default'
withPatchset: true
@@ -52,14 +53,14 @@
testvm: 'tucson-pod'
config-pod: 'tucson-pod'
branch: 'master'
- pipeline-script: 'voltha-physical-tests.groovy'
- oltDebVersion: 'openolt-seba-2.0.deb'
+ oltDebVersion: 'openolt_asfvolt16.deb'
profile: 'Default'
withPatchset: false
- job-template:
id: 'voltha-periodic-test'
name: '{name}'
+ pipeline-script: 'voltha-go-tests.groovy'
description: |
<!-- Managed by Jenkins Job Builder -->
@@ -79,15 +80,10 @@
parameters:
- string:
name: buildNode
- default: 'ubuntu16.04-basebuild-4c-8g'
+ default: '{build-node}'
description: 'Name of the Jenkins node to run the job on'
- string:
- name: testTimeout
- default: '90'
- description: 'timeout for olt/onu validations'
-
- - string:
name: extraHelmFlags
default: '--set defaults.image_tag={default-image-tag},onu={onus},pon={pons}'
description: 'Helm flags to pass to ./voltha up'
@@ -97,8 +93,18 @@
default: '{make-target}'
description: 'Makefile target to invoke during test'
+ - string:
+ name: manifestUrl
+ default: '{gerrit-server-url}/{voltha-test-manifest-repo}'
+ description: 'Repo manifest URL for code checkout (so we can display changes in Jenkins)'
+
+ - string:
+ name: manifestBranch
+ default: '{code-branch}'
+ description: 'Repo manifest branch for code checkout (so we can display changes in Jenkins)'
+
project-type: pipeline
- concurrent: false
+ concurrent: true
dsl: !include-raw-escape: pipeline/{pipeline-script}
@@ -109,7 +115,8 @@
- job-template:
id: 'voltha-patch-test'
- name: '{project}_sanity-system-test'
+ name: 'verify_{project}_sanity-test'
+ extra-helm-flags: '--set defaults.image_tag=$GERRIT_BRANCH'
description: |
<!-- Managed by Jenkins Job Builder -->
@@ -158,28 +165,8 @@
description: 'PatchSet number in Gerrit'
- 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=$GERRIT_BRANCH'
+ default: '{extra-helm-flags}'
description: 'Helm flags to pass to ./voltha up'
project-type: pipeline
@@ -208,6 +195,7 @@
Copyright (c) 2019 Open Networking Foundation (ONF)
project-type: pipeline
sandbox: true
+ pipeline-script: 'voltha-physical-build-and-tests.groovy'
properties:
- cord-infra-properties:
@@ -342,6 +330,7 @@
Copyright (c) 2019 Open Networking Foundation (ONF)
project-type: pipeline
sandbox: true
+ pipeline-script: 'voltha-physical-build-and-tests.groovy'
properties:
- cord-infra-properties:
@@ -361,8 +350,8 @@
- string:
name: manifestBranch
- default: '$GERRIT_BRANCH'
- description: 'Name of the repo branch to use'
+ default: 'master'
+ description: 'Name of the repo branch to use (change to $GERRIT_BRANCH if testing a patchset)'
- string:
name: gerritProject
diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh
index 23fb474..e212118 100644
--- a/packer/provision/basebuild.sh
+++ b/packer/provision/basebuild.sh
@@ -154,7 +154,7 @@
# install ruby gems
gem install \
- mdl
+ mdl -v 0.5.0
# end of gem install list
# install npm modules