@@ -100,25 +100,18 @@ deploy_aio:
100
100
when: never
101
101
# Allow deployments to be manually triggered even when there are no changed files
102
102
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
103
- # Run when there is a push to a branch with a merge request that changes one of the relevant files
104
- - if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
105
- changes:
106
- # Files that affect the aio environment
107
- - env
108
- - env.secret
109
- - requirements.yml
110
- - environments/base/**/*
111
- - environments/singlenode/**/*
112
- - environments/site/**/*
113
- - environments/aio/**/*
103
+ # Run when there is a push to a branch with a merge request to main
104
+ - if: >-
105
+ $CI_PIPELINE_SOURCE == "merge_request_event" &&
106
+ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
114
107
environment:
115
108
name: aio/$CI_COMMIT_REF_SLUG
116
109
on_stop: stop_aio
117
110
variables:
118
111
# This is normally taken from the GitLab environment name, but in this case that
119
112
# depends on the branch name so we need to be explicit about the config to use
120
113
AZIMUTH_CONFIG_ENVIRONMENT: aio
121
- ANSIBLE_FORCE_COLOR: true
114
+ ANSIBLE_FORCE_COLOR: " true"
122
115
before_script:
123
116
- source ./bin/ci-setup
124
117
script:
@@ -130,27 +123,17 @@ deploy_aio:
130
123
test_aio:
131
124
stage: aio_test
132
125
rules:
133
- # Do not run for commits to main
134
126
- if: $CI_COMMIT_BRANCH == "main"
135
127
when: never
136
- # Allow deployments to be manually triggered even when there are no changed files
137
128
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
138
- # Run when there is a push to a branch with a merge request that changes one of the relevant files
139
- - if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
140
- changes:
141
- # Files that affect the aio environment
142
- - env
143
- - env.secret
144
- - requirements.yml
145
- - environments/base/**/*
146
- - environments/singlenode/**/*
147
- - environments/site/**/*
148
- - environments/aio/**/*
129
+ - if: >-
130
+ $CI_PIPELINE_SOURCE == "merge_request_event" &&
131
+ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
149
132
environment:
150
133
name: aio/$CI_COMMIT_REF_SLUG
151
134
variables:
152
135
AZIMUTH_CONFIG_ENVIRONMENT: aio
153
- ANSIBLE_FORCE_COLOR: true
136
+ ANSIBLE_FORCE_COLOR: " true"
154
137
before_script:
155
138
- source ./bin/ci-setup
156
139
script:
@@ -174,16 +157,9 @@ stop_aio:
174
157
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "web"
175
158
when: manual
176
159
allow_failure: true
177
- - if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "merge_request_event"
178
- changes:
179
- # Files that affect the aio environment
180
- - env
181
- - env.secret
182
- - requirements.yml
183
- - environments/base/**/*
184
- - environments/singlenode/**/*
185
- - environments/site/**/*
186
- - environments/aio/**/*
160
+ - if: >-
161
+ $CI_PIPELINE_SOURCE == "merge_request_event" &&
162
+ $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
187
163
when: manual
188
164
allow_failure: true
189
165
environment:
@@ -192,7 +168,7 @@ stop_aio:
192
168
variables:
193
169
AZIMUTH_CONFIG_ENVIRONMENT: aio
194
170
GIT_STRATEGY: none
195
- ANSIBLE_FORCE_COLOR: true
171
+ ANSIBLE_FORCE_COLOR: " true"
196
172
before_script:
197
173
- git clone ${CI_REPOSITORY_URL} ${CI_PROJECT_NAME}
198
174
- cd ${CI_PROJECT_NAME}
@@ -232,7 +208,7 @@ deploy_staging:
232
208
environment:
233
209
name: staging
234
210
variables:
235
- ANSIBLE_FORCE_COLOR: true
211
+ ANSIBLE_FORCE_COLOR: " true"
236
212
before_script:
237
213
- source ./bin/ci-setup
238
214
script:
@@ -264,7 +240,7 @@ test_staging:
264
240
environment:
265
241
name: staging
266
242
variables:
267
- ANSIBLE_FORCE_COLOR: true
243
+ ANSIBLE_FORCE_COLOR: " true"
268
244
before_script:
269
245
- source ./bin/ci-setup
270
246
script:
@@ -305,7 +281,7 @@ deploy_production:
305
281
environment:
306
282
name: production
307
283
variables:
308
- ANSIBLE_FORCE_COLOR: true
284
+ ANSIBLE_FORCE_COLOR: " true"
309
285
before_script:
310
286
- source ./bin/ci-setup
311
287
script:
@@ -333,7 +309,7 @@ test_production:
333
309
environment:
334
310
name: production
335
311
variables:
336
- ANSIBLE_FORCE_COLOR: true
312
+ ANSIBLE_FORCE_COLOR: " true"
337
313
before_script:
338
314
- source ./bin/ci-setup
339
315
script:
0 commit comments