-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
32 lines (32 loc) · 909 Bytes
/
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
pipeline {
agent none
stages {
stage ('Notify') {
steps {
echo "Prompting for approval"
}
post {
success {
slackSend color: 'green', message: "${JOB_NAME} pipeline job is awaiting approval at: ${RUN_DISPLAY_URL}"
}
}
}
stage('Deploy') {
options {
timeout(time: 300, unit: 'SECONDS')
}
input {
message "Should we deploy?"
submitterParameter "APPROVER"
}
steps {
echo "Continuing with deployment - approved by ${APPROVER}"
}
post {
success {
slackSend color: 'green', message: "${JOB_NAME} has completed deployment. View here: ${RUN_DISPLAY_URL}, approved by ${APPROVER}"
}
}
}
}
}