blob: e9d6bf987d6c367c1af3955f9ff55fb03dd701d2 [file] [log] [blame]
alshabib16bdc1a2016-10-18 14:31:32 +01001node ('build') {
2 stage 'Checkout cord repo'
3 m_url = 'https://gerrit.opencord.org/manifest'
4 checkout changelog: false, poll: false, scm [$class: 'RepoScm', currentBranch: true, manifestRepositoryUrl: m_url, quiet: true]
5
6 dir ('incubator/voltha') {
7 try {
8 stage 'Bring up voltha dev vm'
9 sh 'vagrant up voltha'
10
11 stage 'Build voltha'
12 sh 'vagrant ssh -c "cd /voltha && source env.sh && make fetch && make" voltha'
13
14 stage 'Bring up voltha containers'
15 sh 'vagrant ssh -c "cd /voltha && source env.sh && docker-compose -f compose/docker-compose-system-test.yml up -d" voltha'
16
17 currentBuild.result = 'SUCCESS'
18 step([$class: 'Mailer', recipients: 'cord-dev@opencord.org', sendToIndividuals: false])
19 } catch (err) {
20 currentBuild.result = 'FAILURE'
21 step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'cord-dev@opencord.org', sendToIndividuals: false])
22 } finally {
23 sh 'vagrant destroy -f voltha'
24 }
25 echo "RESULT: ${currentBuild.result}"
26 }
27}