-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
41 lines (36 loc) · 1.08 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
elifePipeline {
def commit
DockerImage image
stage 'Checkout', {
checkout scm
commit = elifeGitRevision()
}
node('containers-jenkins-plugin') {
stage 'Build image', {
checkout scm
dockerComposeBuild commit
}
stage 'Project tests', {
dockerProjectTests 'recommendations', commit
}
elifeMainlineOnly {
stage 'Push image', {
image = DockerImage.elifesciences(this, "recommendations", commit).push()
}
}
}
elifeMainlineOnly {
stage 'Deploy on continuumtest', {
lock('recommendations--continuumtest') {
builderDeployRevision 'recommendations--continuumtest', commit
builderSmokeTests 'recommendations--continuumtest', '/srv/recommendations'
}
}
stage 'Approval', {
elifeGitMoveToBranch commit, 'approved'
node('containers-jenkins-plugin') {
image.pull().tag('approved').push()
}
}
}
}