Jenkins file for voltha test job
Change-Id: I173e174c59f6da6de58ccfdec9abb847f36a2473
diff --git a/Jenkinsfile-voltha-build b/Jenkinsfile-voltha-build
index 04bb1a3..5e4c63f 100644
--- a/Jenkinsfile-voltha-build
+++ b/Jenkinsfile-voltha-build
@@ -126,7 +126,7 @@
"""
}
}
- stage('Push Tech-Profile') {
+ /*stage('Push Tech-Profile') {
timeout(1) {
waitUntil {
sh returnStdout: true, script: """
@@ -135,7 +135,7 @@
"""
}
}
- }
+ }*/
}
currentBuild.result = 'SUCCESS'
} catch (err) {
diff --git a/Jenkinsfile-voltha-test b/Jenkinsfile-voltha-test
new file mode 100644
index 0000000..e684f54
--- /dev/null
+++ b/Jenkinsfile-voltha-test
@@ -0,0 +1,67 @@
+// 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 ("${TestNodeName}") {
+ timeout (200) {
+ try {
+ stage ("Parse deployment configuration file") {
+ sh returnStdout: true, script: "rm -rf ${configBaseDir}"
+ sh returnStdout: true, script: "git clone -b ${branch} ${cordRepoUrl}/${configBaseDir}"
+ deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
+ }
+ stage('Download Test repos') {
+ timeout(2) {
+ sh returnStdout: true, script: """
+ rm -rf helm-charts cord-tester voltha
+ git clone -b ${branch} ${cordRepoUrl}/helm-charts
+ git clone -b ${branch} ${cordRepoUrl}/cord-tester
+ git clone -b ${branch} ${cordRepoUrl}/voltha-system-tests
+ git clone -b ${branch} ${cordRepoUrl}/voltha
+ """
+ }
+ }
+ stage('Subscriber Validation and Ping Tests') {
+ timeout(180) {
+ sh """
+ export KUBECONFIG=$WORKSPACE/${configBaseDir}/${configKubernetesDir}/${configFileName}.conf
+ cd $WORKSPACE/voltha-system-tests/tests
+ robot --removekeywords wuks -d Log -T -l Voltha_PODTests -V $WORKSPACE/${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml -v POD_NAME:${configFileName} -v KUBERNETES_CONFIGS_DIR:$WORKSPACE/${configBaseDir}/${configKubernetesDir} Voltha_PODTests.robot || true
+ """
+ }
+ }
+ stage('Publish test results') {
+ sh returnStdout: true, script: """
+ if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs;
+ mkdir RobotLogs/TestDoc || true
+ cp -r $WORKSPACE/voltha-system-tests/tests/Log/* $WORKSPACE/RobotLogs || true
+ """
+ step([$class: 'RobotPublisher',
+ disableArchiveOutput: false,
+ logFileName: 'RobotLogs/log*.html',
+ otherFiles: '',
+ outputFileName: 'RobotLogs/output*.xml',
+ outputPath: '.',
+ passThreshold: 100,
+ reportFileName: 'RobotLogs/report*.html',
+ unstableThreshold: 0
+ ])
+ }
+ currentBuild.result = 'SUCCESS'
+ } catch (err) {
+ currentBuild.result = 'FAILURE'
+ step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "${notificationEmail}", sendToIndividuals: false])
+ }
+ echo "RESULT: ${currentBuild.result}"
+ }
+}