-
-
Notifications
You must be signed in to change notification settings - Fork 99
/
Jenkinsfile
101 lines (100 loc) · 3.06 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
pipeline {
agent {
label 'openjdk8bot'
}
tools {
maven 'maven-3.6'
jdk 'adoptopenjdk-jdk8'
}
environment {
MAVEN_OPTS='-Djava.awt.headless=true -Xmx3096m'
}
stages {
stage ('Initialize') {
steps {
sh '''
echo "PATH = ${PATH}"
echo "M2_HOME = ${M2_HOME}"
'''
sh 'mvn -version'
sh 'java -version'
sh 'git --version'
}
}
stage ('Build') {
steps {
echo 'Unit testing'
sh 'mvn -B -C -Poracle,mssql clean test-compile'
}
}
stage ('Integration Test') {
steps {
echo 'Integration testing'
sh 'mvn -B -C -Pintegration-tests,oracle,mssql install'
}
post {
always {
junit '**/target/*-reports/*.xml'
}
}
}
stage ('Quality Checks') {
when {
branch 'master'
}
steps {
echo 'Quality checking'
sh 'mvn -B -C -fae -Poracle,mssql findbugs:findbugs checkstyle:checkstyle javadoc:javadoc'
}
post {
success {
findbugs canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: '**/findbugsXml.xml', unHealthy: ''
checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: '**/checkstyle-result.xml', unHealthy: ''
}
}
}
stage ('Acceptance Test') {
when {
branch 'master'
}
steps {
echo 'Preparing test harness: TEAM Engine'
echo 'Download and start TEAM Engine'
echo 'Start SUT deegree webapp with test configuration'
echo 'Run FAT'
}
post {
success {
echo 'FAT passed successfully'
}
}
}
stage ('Release') {
when {
branch 'master'
}
steps {
echo 'Prepare release version...'
echo 'Build and publish documentation'
sh 'mvn -pl :deegree-webservices-handbook -Phandbook install'
echo 'Build docker image...'
}
post {
success {
// post release on github
archiveArtifacts artifacts: '**/target/deegree-webservices-*.war', fingerprint: true
}
}
}
stage ('Deploy PROD') {
when {
branch 'master'
}
// install current release version on demo.deegree.org
steps {
echo 'Deploying to demo.deegree.org...'
echo 'Running smoke tests...'
}
}
}
}