forked from CROSSINGTUD/SPDS
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Jenkinsfile
60 lines (50 loc) · 1.96 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
pipeline {
agent any
stages {
stage('Build') {
steps {
withMaven(
options: [artifactsPublisher(disabled: true)],
maven: 'Maven 3.6.3',
mavenSettingsConfig: '9ff5ed8e-79e5-4010-b7e2-f137f16176dd') {
sh 'mvn -P ci clean package -DskipTests'
}
}
}
stage('Unit Tests') {
steps {
withMaven(
options: [artifactsPublisher(disabled: true)],
maven: 'Maven 3.6.3',
mavenSettingsConfig: '9ff5ed8e-79e5-4010-b7e2-f137f16176dd') {
sh 'mvn -P ci test'
}
}
}
stage('Check style') {
steps {
withMaven(
options: [artifactsPublisher(disabled: true)],
maven: 'Maven 3.6.3',
mavenSettingsConfig: '9ff5ed8e-79e5-4010-b7e2-f137f16176dd') {
sh 'mvn -P ci com.coveo:fmt-maven-plugin:check -DskipFormatPlugin=false'
}
}
}
stage ('Deploy') {
when {
anyOf {
branch 'master';
branch 'develop' }
}
steps {
withMaven(
options: [artifactsPublisher(disabled: true)],
maven: 'Maven 3.6.3',
mavenSettingsConfig: '9ff5ed8e-79e5-4010-b7e2-f137f16176dd') {
sh 'mvn deploy -P ci -DskipTests'
}
}
}
}
}