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 | |
Oleg Polyakov | 9e76f5d | 2018-06-18 17:21:33 -0400 | [diff] [blame] | 12 | stage ('Cleanup workspace') { |
| 13 | steps { |
| 14 | sh 'rm -rf ./build ./component ./incubator ./onos-apps ./orchestration ./test ./.repo' |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | stage('voltha Repo') { |
| 19 | steps { |
| 20 | checkout(changelog: false, \ |
| 21 | poll: false, |
| 22 | scm: [$class: 'RepoScm', \ |
| 23 | manifestRepositoryUrl: "${params.manifestUrl}", \ |
| 24 | manifestBranch: "${params.manifestBranch}", \ |
| 25 | currentBranch: true, \ |
| 26 | destinationDir: 'cord', \ |
| 27 | forceSync: true, |
| 28 | resetFirst: true, \ |
| 29 | quiet: true, \ |
| 30 | jobs: 4, \ |
| 31 | showAllChanges: true] \ |
| 32 | ) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | stage ('Bring up voltha dev vm') { |
| 37 | steps { |
| 38 | sh ''' |
| 39 | pushd $WORKSPACE/cord/incubator/voltha |
| 40 | vagrant up voltha |
| 41 | popd |
| 42 | ''' |
| 43 | } |
| 44 | } |
| 45 | stage ('Remove the pre-created venv-linux') { |
| 46 | steps { |
| 47 | sh 'vagrant ssh -c "rm -rf $WORKSPACE/cord/incubator/voltha/venv-linux"' |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | stage ('Build voltha and onos') { |
| 52 | steps { |
| 53 | sh 'vagrant ssh -c "cd $WORKSPACE/cord/incubator/voltha && source env.sh && make fetch-jenkins && make jenkins && make onos" voltha' } |
| 54 | } |
| 55 | |
Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 56 | stage ('Start Provisioning Test') { |
| 57 | steps { |
| 58 | println 'Start Provisioning Test' |
Oleg Polyakov | 9e76f5d | 2018-06-18 17:21:33 -0400 | [diff] [blame] | 59 | sh 'vagrant ssh -c "cd $WORKSPACE/cord/incubator/voltha/tests && pwd" voltha' } |
Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 60 | } |
| 61 | } |
Oleg Polyakov | 4d45436 | 2018-06-15 10:52:52 -0400 | [diff] [blame] | 62 | } |