blob: 2856bb230d9794427355f4c9fa27777432684f66 [file] [log] [blame]
Oleg Polyakov4d454362018-06-15 10:52:52 -04001/* voltha-atest-provisioning pipeline */
2
3pipeline {
4
5 /* no label, executor is determined by JJB */
6 agent {
7 label "${params.executorNode}"
8 }
9
10 stages {
11
Kailash Khalasicdb46672018-10-30 12:55:16 -070012 stage ('Clean up') {
13 steps {
14 sh '''
15 rm -rf $WORKSPACE/
16 '''
17 }
18 }
19
20 stage('Voltha Repo') {
Oleg Polyakov9e76f5d2018-06-18 17:21:33 -040021 steps {
22 checkout(changelog: false, \
23 poll: false,
24 scm: [$class: 'RepoScm', \
25 manifestRepositoryUrl: "${params.manifestUrl}", \
26 manifestBranch: "${params.manifestBranch}", \
27 currentBranch: true, \
28 destinationDir: 'cord', \
29 forceSync: true,
30 resetFirst: true, \
31 quiet: true, \
32 jobs: 4, \
33 showAllChanges: true] \
34 )
35 }
36 }
37
Kailash Khalasicdb46672018-10-30 12:55:16 -070038 stage ('Build Voltha and ONOS') {
Oleg Polyakov9e76f5d2018-06-18 17:21:33 -040039 steps {
Oleg Polyakovd9de9032018-06-28 11:42:32 -040040 sh '''
Kailash Khalasiaa35cd32018-11-12 12:30:08 -080041 sudo service docker restart
Oleg Polyakovd9de9032018-06-28 11:42:32 -040042 cd $WORKSPACE/cord/incubator/voltha
Kailash Khalasicdb46672018-10-30 12:55:16 -070043 chmod +x env.sh
Oleg Polyakovd9de9032018-06-28 11:42:32 -040044 source env.sh
Kailash Khalasif0720122018-11-08 10:18:24 -080045 make fetch
46 make clean
47 make build
Oleg Polyakovd9de9032018-06-28 11:42:32 -040048 '''
49 }
50 }
Oleg Polyakov9e76f5d2018-06-18 17:21:33 -040051
Oleg Polyakov4d454362018-06-15 10:52:52 -040052 stage ('Start Provisioning Test') {
53 steps {
Kailash Khalasicdb46672018-10-30 12:55:16 -070054 sh '''
55 cd $WORKSPACE/cord/incubator/voltha/tests/atests/common/
Kailash3bba5fe2018-11-06 10:48:25 -080056 ./run_robot.sh jenkinstest || true
Kailash Khalasicdb46672018-10-30 12:55:16 -070057 '''
Oleg Polyakov4d454362018-06-15 10:52:52 -040058 }
59 }
Kailash Khalasicdb46672018-10-30 12:55:16 -070060
61 stage('Publish') {
62 steps {
63 sh """
64 if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs
65 cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/ ./RobotLogs
Kailash3bba5fe2018-11-06 10:48:25 -080066 cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/voltha_test_results/*.log $WORKSPACE/
Kailash Khalasicdb46672018-10-30 12:55:16 -070067 """
68
69 step([$class: 'RobotPublisher',
70 disableArchiveOutput: false,
Kailash3bba5fe2018-11-06 10:48:25 -080071 logFileName: 'RobotLogs/jenkinstest/log*.html',
Kailash Khalasicdb46672018-10-30 12:55:16 -070072 otherFiles: '',
Kailash3bba5fe2018-11-06 10:48:25 -080073 outputFileName: 'RobotLogs/jenkinstest/output*.xml',
Kailash Khalasicdb46672018-10-30 12:55:16 -070074 outputPath: '.',
75 passThreshold: 100,
Kailash3bba5fe2018-11-06 10:48:25 -080076 reportFileName: 'RobotLogs/jenkinstest/report*.html',
Kailash Khalasicdb46672018-10-30 12:55:16 -070077 unstableThreshold: 0]);
78 }
79 }
Kailash45b2e8d2018-11-05 09:17:00 -080080 }
Kailash Khalasicdb46672018-10-30 12:55:16 -070081
Kailash45b2e8d2018-11-05 09:17:00 -080082 post {
83 always {
Kailash45b2e8d2018-11-05 09:17:00 -080084 archiveArtifacts artifacts: '*.log'
85 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "gdepatie@northforgeinc.com, kailash@opennetworking.org", sendToIndividuals: false])
86 }
Oleg Polyakovd9de9032018-06-28 11:42:32 -040087 }
Oleg Polyakov4d454362018-06-15 10:52:52 -040088}
Kailash Khalasicdb46672018-10-30 12:55:16 -070089
90