-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.groovy
51 lines (44 loc) · 1.16 KB
/
pipeline.groovy
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
def pipeline() {
pipeline {
agent {
docker {
image 'foo/bar'
}
}
stages {
stage('Build') {
steps {
// Perform the build steps here
sh 'mvn clean install'
}
}
stage('Test') {
steps {
// Run the tests here
sh 'mvn test'
}
}
stage('Deploy') {
steps {
// Deploy the application here
sh 'mvn deploy'
}
}
}
post {
success {
// Actions to perform when the pipeline succeeds
echo 'Pipeline succeeded!'
}
failure {
// Actions to perform when the pipeline fails
echo 'Pipeline failed!'
}
always {
// Actions to perform always, regardless of the pipeline result
echo 'Pipeline finished!'
}
}
}
}
return this