forked from endofcake/ecs-cluster-update-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
44 lines (39 loc) · 738 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
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env groovy
pipeline {
agent any
triggers {
cron('H 09 * * 1-5')
}
options {
timestamps()
disableConcurrentBuilds()
}
environment {
STACK_NAME = "default"
}
stages {
stage('Taint container instances') {
steps {
tag('true')
}
}
stage('Deploy') {
steps {
// This is just a placeholder, the actual deployment procedure
// will be specific to a given project.
deploy()
}
}
}
post {
always {
// Untaint old instances if update failed or was not performed
tag('false')
}
}
}
def tag(drain) {
withEnv(["STACK_NAME=${STACK_NAME}", "DRAIN_TAG=${drain}"]) {
sh "./scripts/run_tag_lambda.sh"
}
}