Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 1 | /* voltha-atest-provisioning pipeline */ |
| 2 | |
| 3 | pipeline { |
| 4 | |
| 5 | /* no label, executor is determined by JJB */ |
| 6 | agent { |
| 7 | label "${params.executorNode}" |
| 8 | } |
| 9 | |
| 10 | stages { |
| 11 | |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 12 | stage ('Clean up') { |
| 13 | steps { |
| 14 | sh ''' |
| 15 | rm -rf $WORKSPACE/ |
| 16 | ''' |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | stage('Voltha Repo') { |
Oleg Polyakov | 9e76f5d | 2018-06-18 17:21:33 -0400 | [diff] [blame] | 21 | 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 Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 38 | stage ('Build Voltha and ONOS') { |
Oleg Polyakov | 9e76f5d | 2018-06-18 17:21:33 -0400 | [diff] [blame] | 39 | steps { |
Oleg Polyakov | d9de903 | 2018-06-28 11:42:32 -0400 | [diff] [blame] | 40 | sh ''' |
Kailash Khalasi | aa35cd3 | 2018-11-12 12:30:08 -0800 | [diff] [blame] | 41 | sudo service docker restart |
Oleg Polyakov | d9de903 | 2018-06-28 11:42:32 -0400 | [diff] [blame] | 42 | cd $WORKSPACE/cord/incubator/voltha |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 43 | chmod +x env.sh |
Oleg Polyakov | d9de903 | 2018-06-28 11:42:32 -0400 | [diff] [blame] | 44 | source env.sh |
Kailash Khalasi | f072012 | 2018-11-08 10:18:24 -0800 | [diff] [blame] | 45 | make fetch |
| 46 | make clean |
| 47 | make build |
Oleg Polyakov | d9de903 | 2018-06-28 11:42:32 -0400 | [diff] [blame] | 48 | ''' |
| 49 | } |
| 50 | } |
Oleg Polyakov | 9e76f5d | 2018-06-18 17:21:33 -0400 | [diff] [blame] | 51 | |
Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 52 | stage ('Start Provisioning Test') { |
| 53 | steps { |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 54 | sh ''' |
| 55 | cd $WORKSPACE/cord/incubator/voltha/tests/atests/common/ |
Kailash | 3bba5fe | 2018-11-06 10:48:25 -0800 | [diff] [blame] | 56 | ./run_robot.sh jenkinstest || true |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 57 | ''' |
Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 58 | } |
| 59 | } |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 60 | |
| 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 |
Kailash | 3bba5fe | 2018-11-06 10:48:25 -0800 | [diff] [blame] | 66 | cp -r $WORKSPACE/cord/incubator/voltha/jenkinstest/voltha_test_results/*.log $WORKSPACE/ |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 67 | """ |
| 68 | |
| 69 | step([$class: 'RobotPublisher', |
| 70 | disableArchiveOutput: false, |
Kailash | 3bba5fe | 2018-11-06 10:48:25 -0800 | [diff] [blame] | 71 | logFileName: 'RobotLogs/jenkinstest/log*.html', |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 72 | otherFiles: '', |
Kailash | 3bba5fe | 2018-11-06 10:48:25 -0800 | [diff] [blame] | 73 | outputFileName: 'RobotLogs/jenkinstest/output*.xml', |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 74 | outputPath: '.', |
| 75 | passThreshold: 100, |
Kailash | 3bba5fe | 2018-11-06 10:48:25 -0800 | [diff] [blame] | 76 | reportFileName: 'RobotLogs/jenkinstest/report*.html', |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 77 | unstableThreshold: 0]); |
| 78 | } |
| 79 | } |
Kailash | 45b2e8d | 2018-11-05 09:17:00 -0800 | [diff] [blame] | 80 | } |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 81 | |
Kailash | 45b2e8d | 2018-11-05 09:17:00 -0800 | [diff] [blame] | 82 | post { |
| 83 | always { |
Kailash | 45b2e8d | 2018-11-05 09:17:00 -0800 | [diff] [blame] | 84 | archiveArtifacts artifacts: '*.log' |
| 85 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: "gdepatie@northforgeinc.com, kailash@opennetworking.org", sendToIndividuals: false]) |
| 86 | } |
Oleg Polyakov | d9de903 | 2018-06-28 11:42:32 -0400 | [diff] [blame] | 87 | } |
Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 88 | } |
Kailash Khalasi | cdb4667 | 2018-10-30 12:55:16 -0700 | [diff] [blame] | 89 | |
| 90 | |