-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathpost1.jenkins
67 lines (67 loc) · 1.9 KB
/
post1.jenkins
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pipeline {
agent any
stages {
stage("Build") {
steps {
echo "Build stage."
}
post {
always {
echo "This block always runs after this stage."
}
}
}
stage("Test") {
steps {
echo "Test stage."
}
post {
unstable {
echo "This block runs when the status of this stage is marked unstable."
}
}
}
stage("Release") {
steps {
echo "Release stage."
}
post {
success {
echo "This block runs when the stage succeeded."
}
}
}
}
post {
always {
echo "This block always runs."
}
changed {
echo "This block runs when the current status is different than the previous one."
}
fixed {
echo "This block runs when the current status is success and the previous one was failed or unstable."
}
regression {
echo "This block runs when the current status is anything except success but the previous one was successful."
}
unstable {
echo "This block runs if the current status is marked unstable."
}
aborted {
echo "This block runs when the build process is aborted."
}
failure {
echo "This block runs when the build is failed."
}
success {
echo "This block runs when the build is succeeded."
}
unsuccessful {
echo "This block runs when the current status is anything except success."
}
cleanup {
echo "This block always runs after other conditions are evaluated."
}
}
}