-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
51 lines (45 loc) · 1.41 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
46
47
48
49
50
51
elifePipeline {
def commit
DockerImage cli
DockerImage fpm
stage 'Checkout', {
checkout scm
commit = elifeGitRevision()
}
node('containers-jenkins-plugin') {
stage 'Build images', {
checkout scm
dockerComposeBuild commit
}
stage 'Project tests', {
dockerProjectTests 'annotations', commit
dockerComposeSmokeTests(commit, [
'scripts': [
'cli': './smoke_tests_cli.sh',
'fpm': './smoke_tests_fpm.sh',
],
])
}
elifeMainlineOnly {
stage 'Push images', {
cli = DockerImage.elifesciences(this, "annotations_cli", commit).push()
fpm = DockerImage.elifesciences(this, "annotations_fpm", commit).push()
}
}
}
elifeMainlineOnly {
stage 'Deploy to continuumtest', {
lock('annotations--continuumtest') {
builderDeployRevision 'annotations--continuumtest', commit
builderSmokeTests 'annotations--continuumtest', '/srv/annotations'
}
}
stage 'Approval', {
elifeGitMoveToBranch commit, 'approved'
node('containers-jenkins-plugin') {
cli.pull().tag('approved').push()
fpm.pull().tag('approved').push()
}
}
}
}