blob: ea8d1987f687a7ccf9973c257e782ae11afdf068 [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
Oleg Polyakov9e76f5d2018-06-18 17:21:33 -040012 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 Polyakov4d454362018-06-15 10:52:52 -040056 stage ('Start Provisioning Test') {
57 steps {
58 println 'Start Provisioning Test'
Oleg Polyakov9e76f5d2018-06-18 17:21:33 -040059 sh 'vagrant ssh -c "cd $WORKSPACE/cord/incubator/voltha/tests && pwd" voltha' }
Oleg Polyakov4d454362018-06-15 10:52:52 -040060 }
61 }
Oleg Polyakov4d454362018-06-15 10:52:52 -040062}