blob: 6b112920814d25ce8bd8f80bf14fdff4a2dd793a [file] [log] [blame]
Kailash Khalasic3f74902018-06-12 09:20:38 -07001/* voltha-automated-build pipeline */
2
3pipeline {
4
5 /* no label, executor is determined by JJB */
6 agent {
7 label "${params.executorNode}"
8 }
9
10 stages {
11
12 stage ('Cleanup workspace') {
13 steps {
14 sh 'rm -rf ./build ./component ./incubator ./onos-apps ./orchestration ./test ./.repo'
15 }
16 }
17
18 stage('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
37 stage ('Bring up voltha dev vm') {
38 steps {
39 sh '''
40 pushd incubator/voltha
41 vagrant up voltha
42 popd
43 '''
44 }
45 }
46 stage ('Remove the pre-created venv-linux') {
47 steps {
48 sh 'vagrant ssh -c "rm -rf /cord/incubator/voltha/venv-linux"'
49 }
50 }
51
52 stage ('Build voltha') {
53 steps {
54 sh 'vagrant ssh -c "cd /cord/incubator/voltha && source env.sh && make fetch-jenkins && make jenkins" voltha' }
55 }
56
57 stage ('Bring up voltha containers') {
58 steps {
59 sh 'vagrant ssh -c "cd /cord/incubator/voltha && source env.sh && docker-compose -f compose/docker-compose-docutests.yml up -d" voltha' }
60 }
61
62 stage ('Run Integration Tests') {
63 steps {
64 sh 'vagrant ssh -c "cd /cord/incubator/voltha && source env.sh && make jenkins-test" voltha' }
65 }
66
67 }
68}