blob: cd6552f71292fbc1f9f0c169281de39632ce5975 [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 '''
41 cd $WORKSPACE/cord/incubator/voltha
Kailash Khalasicdb46672018-10-30 12:55:16 -070042 chmod +x env.sh
Oleg Polyakovd9de9032018-06-28 11:42:32 -040043 source env.sh
Kailash Khalasif0720122018-11-08 10:18:24 -080044 make fetch
45 make clean
46 make build
Oleg Polyakovd9de9032018-06-28 11:42:32 -040047 '''
48 }
49 }
Oleg Polyakov9e76f5d2018-06-18 17:21:33 -040050
Oleg Polyakov4d454362018-06-15 10:52:52 -040051 stage ('Start Provisioning Test') {
52 steps {
Kailash Khalasicdb46672018-10-30 12:55:16 -070053 sh '''
54 cd $WORKSPACE/cord/incubator/voltha/tests/atests/common/
Kailash3bba5fe2018-11-06 10:48:25 -080055 ./run_robot.sh jenkinstest || true
Kailash Khalasicdb46672018-10-30 12:55:16 -070056 '''
Oleg Polyakov4d454362018-06-15 10:52:52 -040057 }
58 }
Kailash Khalasicdb46672018-10-30 12:55:16 -070059
60 stage('Publish') {
61 steps {
62 sh """
63 if [ -d RobotLogs ]; then rm -r RobotLogs; fi; mkdir RobotLogs
64 cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/ ./RobotLogs
Kailash3bba5fe2018-11-06 10:48:25 -080065 cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/voltha_test_results/*.log $WORKSPACE/
Kailash Khalasicdb46672018-10-30 12:55:16 -070066 """
67
68 step([$class: 'RobotPublisher',
69 disableArchiveOutput: false,
Kailash3bba5fe2018-11-06 10:48:25 -080070 logFileName: 'RobotLogs/jenkinstest/log*.html',
Kailash Khalasicdb46672018-10-30 12:55:16 -070071 otherFiles: '',
Kailash3bba5fe2018-11-06 10:48:25 -080072 outputFileName: 'RobotLogs/jenkinstest/output*.xml',
Kailash Khalasicdb46672018-10-30 12:55:16 -070073 outputPath: '.',
74 passThreshold: 100,
Kailash3bba5fe2018-11-06 10:48:25 -080075 reportFileName: 'RobotLogs/jenkinstest/report*.html',
Kailash Khalasicdb46672018-10-30 12:55:16 -070076 unstableThreshold: 0]);
77 }
78 }
Kailash45b2e8d2018-11-05 09:17:00 -080079 }
Kailash Khalasicdb46672018-10-30 12:55:16 -070080
Kailash45b2e8d2018-11-05 09:17:00 -080081 post {
82 always {
Kailash45b2e8d2018-11-05 09:17:00 -080083 archiveArtifacts artifacts: '*.log'
84 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "gdepatie@northforgeinc.com, kailash@opennetworking.org", sendToIndividuals: false])
85 }
Oleg Polyakovd9de9032018-06-28 11:42:32 -040086 }
Oleg Polyakov4d454362018-06-15 10:52:52 -040087}
Kailash Khalasicdb46672018-10-30 12:55:16 -070088
89