alshabib | 16bdc1a | 2016-10-18 14:31:32 +0100 | [diff] [blame^] | 1 | node ('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 | } |