Matteo Scandolo | 83df8d2 | 2017-03-09 10:39:17 -0800 | [diff] [blame] | 1 | def filename = 'manifest-${branch}.xml' |
| 2 | |
| 3 | node ('master') { |
| 4 | checkout changelog: false, poll: false, scm: [$class: 'RepoScm', currentBranch: true, manifestBranch: params.branch, manifestRepositoryUrl: 'https://gerrit.opencord.org/manifest', quiet: true] |
| 5 | |
| 6 | stage 'Generate and Copy Manifest file' |
| 7 | sh returnStdout: true, script: 'repo manifest -r -o ' + filename |
| 8 | sh returnStdout: true, script: 'cp ' + filename + ' ' + env.JENKINS_HOME + '/tmp' |
| 9 | } |
| 10 | |
| 11 | timeout (time: 240) { |
| 12 | node ("${targetVM}") { |
Matteo Scandolo | f4f6955 | 2017-08-24 17:26:25 -0700 | [diff] [blame] | 13 | stage 'Checkout cord repo' |
| 14 | checkout changelog: false, poll: false, scm: [$class: 'RepoScm', currentBranch: true, manifestBranch: params.branch, manifestRepositoryUrl: 'https://gerrit.opencord.org/manifest', quiet: true] |
Matteo Scandolo | 83df8d2 | 2017-03-09 10:39:17 -0800 | [diff] [blame] | 15 | |
Matteo Scandolo | f4f6955 | 2017-08-24 17:26:25 -0700 | [diff] [blame] | 16 | dir('build') { |
| 17 | stage 'Build Mock R-CORD Config' |
| 18 | sh 'make PODCONFIG=rcord-local.yml config' |
| 19 | sh 'make build' |
| 20 | } |
| 21 | dir('orchestration/xos-gui') { |
| 22 | try { |
Matteo Scandolo | 7897e44 | 2017-03-09 10:55:29 -0800 | [diff] [blame] | 23 | |
Matteo Scandolo | f4f6955 | 2017-08-24 17:26:25 -0700 | [diff] [blame] | 24 | stage 'Install npm packages' |
| 25 | sh 'npm install' |
Matteo Scandolo | 7897e44 | 2017-03-09 10:55:29 -0800 | [diff] [blame] | 26 | |
Matteo Scandolo | f4f6955 | 2017-08-24 17:26:25 -0700 | [diff] [blame] | 27 | stage 'Run E2E Tests' |
| 28 | sh 'UI_URL=127.0.0.1/xos/# npm run test:e2e' |
| 29 | currentBuild.result = 'SUCCESS' |
| 30 | } catch (err) { |
| 31 | currentBuild.result = 'FAILURE' |
| 32 | step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'teo@onlab.us', sendToIndividuals: true]) |
| 33 | } finally { |
| 34 | stage 'Cleanup' |
| 35 | dir('build') { |
| 36 | sh 'make clean-local' |
| 37 | sh 'make clean-genconfig' |
| 38 | echo "RESULT: ${currentBuild.result}" |
| 39 | } |
| 40 | } |
| 41 | } |
Matteo Scandolo | 83df8d2 | 2017-03-09 10:39:17 -0800 | [diff] [blame] | 42 | } |
| 43 | } |