-
Notifications
You must be signed in to change notification settings - Fork 13
/
Jenkinsfile.prod
31 lines (27 loc) · 1.06 KB
/
Jenkinsfile.prod
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
elifePipeline {
def commit
stage 'Checkout approved', {
checkout scm
commit = elifeGitRevision()
}
stage 'Deploy to preview', {
elifeDeploySlackNotification 'journal', 'preview'
elifeGitMoveToBranch commit, 'master'
builderDeployRevision 'journal--preview', commit
builderSmokeTests 'journal--preview', '/srv/journal'
}
stage 'Deploy to prod', {
lock('journal--prod') {
elifeDeploySlackNotification 'journal', 'prod'
node('containers-jenkins-plugin') {
DockerImage.elifesciences(this, "journal", commit).pull().tag('latest').push()
}
// ensure all nodes are registered
sh "${env.BUILDER_PATH}bldr 'deploy.load_balancer_register_all:journal--prod'"
// update buildvars in parallel, run highstate blue-green
builderDeployRevision 'journal--prod', commit, 'blue-green'
// run smoke tests in parallel
builderSmokeTests 'journal--prod', '/srv/journal'
}
}
}