-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
64 lines (63 loc) · 1.9 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@Library("rd-apmm-groovy-ci-library@v1.x") _
pipeline {
agent {
label "ubuntu&&apmm-slave"
}
options {
ansiColor('xterm') // Add support for coloured output
buildDiscarder(logRotator(numToKeepStr: '10')) // Discard old builds
}
environment {
http_proxy = "http://www-cache.rd.bbc.co.uk:8080"
https_proxy = "http://www-cache.rd.bbc.co.uk:8080"
}
stages {
stage("Clean Environment") {
steps {
sh 'git clean -dfx'
}
}
stage ("Integration Tests") {
stages {
stage ("Start Test Environment") {
steps {
script {
env.int_result = "FAILURE"
}
bbcGithubNotify(context: "tests/integration", status: "PENDING")
dir ('vagrant') {
sh 'vagrant up --provision'
}
}
}
stage ("Run Integration Tests") {
steps {
bbcVagrantFindPorts(vagrantDir: "vagrant")
sh 'python3 -m unittest discover -v'
script {
env.int_result = "SUCCESS"
}
}
}
stage ("Analyse JUnit files") {
steps {
junit 'tests/*.xml'
}
}
}
post {
always {
dir ('vagrant') {
sh 'vagrant destroy -f'
}
bbcGithubNotify(context: "tests/integration", status: env.int_result)
}
}
}
}
post {
always {
bbcSlackNotify()
}
}
}