forked from simunto/matsim-sbb-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
38 lines (36 loc) · 962 Bytes
/
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
#!groovy
//loading https://code.sbb.ch/projects/KD_WZU/repos/wzu-pipeline-helper
@Library('wzu-pipeline-helper') _
pipeline {
agent { label 'java' }
tools {
maven 'Apache Maven 3.3'
jdk 'Oracle JDK 1.8 64-Bit'
}
stages {
stage('When on develop, Deploy Snapshot and analyze for sonar') {
when {
branch 'develop'
}
steps {
withSonarQubeEnv('Sonar SBB CFF FFS AG') {
sh 'mvn -B clean deploy'
}
}
}
stage('Unit Tests') {
steps {
sh 'mvn -B clean compile test'
junit '**/target/surefire-reports/*.xml'
}
}
stage('When on master, Release: Adapt poms, tag, deploy and push.') {
when {
branch 'master'
}
steps {
releaseMvn()
}
}
}
}