blob: 44fabb19124f6e446ad14397e1ca5fff8e748950 [file] [log] [blame]
Matteo Scandolo83df8d22017-03-09 10:39:17 -08001def filename = 'manifest-${branch}.xml'
2
3node ('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
11timeout (time: 240) {
12 node ("${targetVM}") {
Matteo Scandolof4f69552017-08-24 17:26:25 -070013 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 Scandolo83df8d22017-03-09 10:39:17 -080015
Matteo Scandolof4f69552017-08-24 17:26:25 -070016 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 Scandolo7897e442017-03-09 10:55:29 -080023
Matteo Scandolof4f69552017-08-24 17:26:25 -070024 stage 'Install npm packages'
25 sh 'npm install'
Matteo Scandolo7897e442017-03-09 10:55:29 -080026
Matteo Scandolof4f69552017-08-24 17:26:25 -070027 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 Scandolo83df8d22017-03-09 10:39:17 -080042 }
43}