-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
45 lines (37 loc) · 1.02 KB
/
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
40
41
42
43
44
45
@Library('estl@v2') _
def notifyTargets = []
pipeline {
agent any
options {
disableConcurrentBuilds()
}
stages {
stage('Starting') {
steps {
runnerEnv {
echo sh(returnStdout: true, script: 'env')
notify(targets: notifyTargets, status: 'started', message: 'Started')
script {
currentBuild.description = "${env.IMAGE_TAG} ${env.GIT_SHA}"
}
}
}
}
stage('Build and Push') {
steps {
runner(task: 'build', env: ["IMAGE_PUSH=1"])
}
}
}
post {
failure {
notify(targets: notifyTargets, status: 'failure', message: 'Failure')
}
unstable {
notify(targets: notifyTargets, status: 'unstable', message: 'Unstable')
}
success {
notify(targets: notifyTargets, status: 'success', message: 'Success')
}
}
}