forked from SoftwareAG/sagdevops-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
80 lines (78 loc) · 2.34 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// curl -X POST -F "jenkinsfile=<Jenkinsfile" http://ccbvtauto.eur.ad.sag:8080/pipeline-model-converter/validate
def testTemplate(t, testProvision, buildImage, pushImage) {
dir ("templates/$t") {
try {
if (testProvision) {
sh "docker-compose run --name $t --rm provision"
}
if (buildImage) {
sh "docker-compose build"
if (pushImage) {
sh "docker-compose push"
}
}
} finally {
sh "docker-compose down"
}
}
}
pipeline {
agent {
label 'docker'
}
environment {
TAG = "10.2" // 10.3, 10.2, 10.1
FIXES = 'ALL' // for GA releases or '' for TRUNK
}
stages {
stage('Init') {
steps {
echo "Testing for ${env.TAG} release"
sh ". ./${env.TAG}.env; docker-compose pull cc"
}
}
stage("Level 1") {
parallel {
stage('Universal Messaging') {
steps {
testTemplate('sag-um-server', false, true, true)
}
}
stage('Terracotta') {
steps {
testTemplate('sag-tc-server', true, false, false)
}
}
stage('Integration Server') {
steps {
testTemplate('sag-msc-server', false, true, true)
}
}
}
}
stage("Level 2") {
parallel {
stage('EntireX') {
steps {
testTemplate('sag-exx-broker', true, false, false)
}
}
stage('Designer') {
steps {
testTemplate('sag-designer-services', true, false, false)
}
}
stage('Apama') {
steps {
testTemplate('sag-apama-correlator', true, false, false)
}
}
}
}
}
post {
always {
sh 'docker-compose down'
}
}
}