-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
93 lines (77 loc) · 1.49 KB
/
.gitlab-ci.yml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
stages:
- build
- test
- release
variables:
build_tag: $CI_REGISTRY_IMAGE/$iip_version:$CI_COMMIT_SHORT_SHA
release_tag: $CI_REGISTRY_IMAGE/$iip_version:latest
.build:
stage: build
before_script:
- docker version
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- docker build --pull -t $build_tag - < $iip_version/Dockerfile
- docker push $build_tag
.test:
stage: test
before_script:
- docker version
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $build_tag
script:
- ./test.sh
.release:
stage: release
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker pull $build_tag
- docker tag $build_tag $release_tag
- docker push $release_tag
only:
- master
.iipimage_1.0:
variables:
iip_version: '1.0'
.iipimage_1.1:
variables:
iip_version: '1.1'
.iipimage_post_1.1:
variables:
iip_version: 'post-1.1'
build_1.0:
extends:
- .build
- .iipimage_1.0
test_1.0:
extends:
- .test
- .iipimage_1.0
release_1.0:
extends:
- .release
- .iipimage_1.0
build_1.1:
extends:
- .build
- .iipimage_1.1
test_1.1:
extends:
- .test
- .iipimage_1.1
release_1.1:
extends:
- .release
- .iipimage_1.1
build_post_1.1:
extends:
- .build
- .iipimage_post_1.1
test_post_1.1:
extends:
- .test
- .iipimage_post_1.1
release_post_1.1:
extends:
- .release
- .iipimage_post_1.1