-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
145 lines (130 loc) · 3.4 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
image: altjohndev/docker-compose
services:
- docker:dind
stages:
- update core image
- update related image
before_script:
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
# Core
.update_core_image: &update_core_image
stage: update core image
script:
- docker-compose -f $DOCKER_COMPOSE_FILE build $DOCKER_COMPOSE_SERVICE
- docker-compose -f $DOCKER_COMPOSE_FILE push $DOCKER_COMPOSE_SERVICE
except:
- /^((?!master).)*$/
tags:
- docker
ansible:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: ansible/docker-compose.yml
DOCKER_COMPOSE_SERVICE: manager
only:
changes:
- .gitlab-ci.yml
- ansible/docker/Dockerfile
- ansible/docker-compose.yml
docker-compose:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: docker-compose/docker-compose.yml
DOCKER_COMPOSE_SERVICE: docker-compose
only:
changes:
- .gitlab-ci.yml
- docker-compose/docker/Dockerfile
elixir:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: elixir/docker-compose.yml
DOCKER_COMPOSE_SERVICE: elixir
only:
changes:
- elixir/docker/Dockerfile
elixir alpine:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: elixir/docker-compose.yml
DOCKER_COMPOSE_SERVICE: elixir.alpine
only:
changes:
- .gitlab-ci.yml
- elixir/docker/alpine.Dockerfile
erlang:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: erlang/docker-compose.yml
DOCKER_COMPOSE_SERVICE: erlang
only:
changes:
- .gitlab-ci.yml
- erlang/docker/Dockerfile
- erlang/docker-compose.yml
erlang alpine:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: erlang/docker-compose.yml
DOCKER_COMPOSE_SERVICE: erlang.alpine
only:
changes:
- .gitlab-ci.yml
- erlang/docker/alpine.Dockerfile
- erlang/docker-compose.yml
google cloud manager:
<<: *update_core_image
variables:
DOCKER_COMPOSE_FILE: google-cloud-manager/docker-compose.yml
DOCKER_COMPOSE_SERVICE: manager
only:
changes:
- .gitlab-ci.yml
- google-cloud-manager/docker/Dockerfile
- google-cloud-manager/docker-compose.yml
# Related
.update_related_image: &update_related_image
stage: update related image
script:
- docker-compose -f $DOCKER_COMPOSE_FILE build $DOCKER_COMPOSE_SERVICE
- docker-compose -f $DOCKER_COMPOSE_FILE push $DOCKER_COMPOSE_SERVICE
except:
- /^((?!master).)*$/
tags:
- docker
phoenix:
<<: *update_related_image
variables:
DOCKER_COMPOSE_FILE: phoenix/docker-compose.yml
DOCKER_COMPOSE_SERVICE: phoenix
only:
changes:
- .gitlab-ci.yml
- phoenix/docker/Dockerfile
phoenix nodeless:
<<: *update_related_image
variables:
DOCKER_COMPOSE_FILE: phoenix/docker-compose.yml
DOCKER_COMPOSE_SERVICE: phoenix.nodeless
only:
changes:
- .gitlab-ci.yml
- phoenix/docker/nodeless.Dockerfile
phoenix alpine:
<<: *update_related_image
variables:
DOCKER_COMPOSE_FILE: phoenix/docker-compose.yml
DOCKER_COMPOSE_SERVICE: phoenix.alpine
only:
changes:
- .gitlab-ci.yml
- phoenix/docker/alpine.Dockerfile
phoenix alpine nodeless:
<<: *update_related_image
variables:
DOCKER_COMPOSE_FILE: phoenix/docker-compose.yml
DOCKER_COMPOSE_SERVICE: phoenix.alpine.nodeless
only:
changes:
- .gitlab-ci.yml
- phoenix/docker/alpine-nodeless.Dockerfile