-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
41 lines (40 loc) · 1.05 KB
/
Jenkinsfile
File metadata and controls
41 lines (40 loc) · 1.05 KB
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
pipeline {
agent any
stages {
stage('Init') {
steps {
echo "Hello"
}
}
stage('Read pom') {
steps {
echo "Reading pom.xml"
// script {
// def text = new XmlSlurper().parse(new File("pom.xml")).version.text()
// echo "text ${text}"
// }
script {
pom = readMavenPom file 'pom.xml'
echo "version ${pom.version}"
}
}
}
stage('mvn') {
steps {
sh 'mvn -version'
}
}
}
post {
success {
slackSend channel: '#update',
color: 'good',
message: "Release, success: ${currentBuild.fullDisplayName}."
}
failure {
slackSend channel: '#update',
color: 'danger',
message: "Release, FAILED: ${currentBuild.fullDisplayName}."
}
}
}