forked from codecentric/TDDTrainingApplication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
39 lines (26 loc) · 846 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
39
node {
def mvnHome
stage('Preparation') { // for display purposes
// Get some code from a GitHub repository
git 'https://github.com/codecentric/TDDTrainingApplication.git'
// Get the Maven tool.
// ** NOTE: This 'M3' Maven tool must be configured
// ** in the global configuration.
mvnHome = tool 'maven'
env.JAVA_HOME="${tool 'JDK8'}"
env.PATH="${env.JAVA_HOME}/bin:${env.PATH}"
sh 'java -version'
}
// A minor change in the fole
stage('Build') {
// Move into directory
dir('TDDTrainingApplicationCC') {
// Run the maven build
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
}
}
stage('Results') {
junit '**/target/surefire-reports/TEST-*.xml'
archive 'target/*.jar'
}
}