-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
executable file
·36 lines (29 loc) · 799 Bytes
/
Jenkinsfile
File metadata and controls
executable file
·36 lines (29 loc) · 799 Bytes
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
#!groovy
// Jenkinsfile (Pipeline Script)
mavenConfiguration = [
jdk: "jdk-11",
maven: "m3.5",
mavenLocalRepo: ".repository",
mavenSettingsConfig: "639c4560-87b7-4502-bb3d-2c44845cd2b5"
]
node {
stage('Checkout') {
checkout scm
}
withMaven(mavenConfiguration) {
def mvnParams = "-Dbuild.number=${BUILD_NUMBER} -Dbuild.development=false"
stage('Build') {
sh "mvn ${mvnParams} clean compile"
}
stage('Test') {
sh "mvn ${mvnParams} test"
}
stage('Package') {
sh "mvn ${mvnParams} -DskipStatic -DskipTests package"
}
stage('Deploy') {
sh "mvn ${mvnParams} -DskipStatic -DskipTests deploy"
sh "mvn ${mvnParams} scm:tag"
}
}
}