Skip to content

Commit dda0b10

Browse files
nat-hendersonmodular-magician
authored andcommitted
Report Errors in the Magician (#323)
Merged PR #323.
1 parent cbc5a74 commit dda0b10

File tree

5 files changed

+66
-18
lines changed

5 files changed

+66
-18
lines changed

.ci/ci.yml.tmpl

+62-14
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ resource_types:
4141
type: docker-image
4242
source:
4343
repository: nmckinley/concourse-github-pr-resource
44-
tag: v0.1.8
44+
tag: v0.1.10
4545

4646
- name: gcs-resource
4747
type: docker-image
@@ -172,21 +172,26 @@ jobs:
172172
version: every
173173
trigger: true
174174
params:
175-
fetch_merge: true
175+
fetch_merge: true
176176
# consumes: magic-modules (because that's where the code is)
177177
# products: patches
178-
- task: get-merged-patches
179-
file: magic-modules/.ci/magic-modules/get-merged-patches.yml
180-
params:
181-
GH_TOKEN: ((github-account.password))
182-
# consumes: magic-modules (detached HEAD)
183-
# produces: magic-modules-branched (new branch, with submodule)
184-
- task: branch-magic-modules
185-
file: magic-modules/.ci/magic-modules/branch.yml
186-
params:
187-
GH_TOKEN: ((github-account.password))
188-
CREDS: ((repo-key.private_key))
189-
ALL_SUBMODULES: {{' '.join(all_submodules)}}
178+
- aggregate:
179+
- task: get-merged-patches
180+
file: magic-modules/.ci/magic-modules/get-merged-patches.yml
181+
params:
182+
GH_TOKEN: ((github-account.password))
183+
# consumes: magic-modules (detached HEAD)
184+
# produces: magic-modules-branched (new branch, with submodule)
185+
- task: branch-magic-modules
186+
file: magic-modules/.ci/magic-modules/branch.yml
187+
params:
188+
GH_TOKEN: ((github-account.password))
189+
CREDS: ((repo-key.private_key))
190+
ALL_SUBMODULES: {{' '.join(all_submodules)}}
191+
- put: magic-modules-new-prs
192+
params:
193+
status: pending
194+
path: magic-modules
190195
- aggregate:
191196
{% if terraform_enabled %}
192197
- do:
@@ -253,6 +258,12 @@ jobs:
253258
force: true
254259
{% endfor %}
255260
{% endif %}
261+
on_failure:
262+
put: magic-modules-new-prs
263+
params:
264+
status: failed
265+
context: code-generation
266+
path: magic-modules
256267

257268
# consumes: magic-modules-branched
258269
# produces: magic-modules-submodules
@@ -286,6 +297,15 @@ jobs:
286297
passed: [mm-generate]
287298
- task: test
288299
file: magic-modules/.ci/unit-tests/task.yml
300+
on_failure:
301+
do:
302+
- get: magic-modules-new-prs
303+
passed: [mm-generate]
304+
- put: magic-modules-new-prs
305+
params:
306+
status: failed
307+
context: terraform-tests
308+
path: magic-modules-new-prs
289309
{% endif %}
290310
{% if ansible_enabled %}
291311
- name: ansible-test
@@ -298,6 +318,15 @@ jobs:
298318
passed: [mm-generate]
299319
- task: test
300320
file: magic-modules/.ci/unit-tests/ansible.yml
321+
on_failure:
322+
do:
323+
- get: magic-modules-new-prs
324+
passed: [mm-generate]
325+
- put: magic-modules-new-prs
326+
params:
327+
status: failed
328+
context: ansible-tests
329+
path: magic-modules-new-prs
301330
{% endif %}
302331
- name: puppet-test
303332
plan:
@@ -320,6 +349,15 @@ jobs:
320349
EXCLUDE_PATTERN: {{','.join(puppet_test_excludes[module])}}
321350
{%- endif %}
322351
{% endfor %}
352+
on_failure:
353+
do:
354+
- get: magic-modules-new-prs
355+
passed: [mm-generate]
356+
- put: magic-modules-new-prs
357+
params:
358+
status: failed
359+
context: puppet-tests
360+
path: magic-modules-new-prs
323361

324362
- name: chef-test
325363
plan:
@@ -342,6 +380,15 @@ jobs:
342380
EXCLUDE_PATTERN: {{','.join(chef_test_excludes[module])}}
343381
{%- endif %}
344382
{% endfor %}
383+
on_failure:
384+
do:
385+
- get: magic-modules-new-prs
386+
passed: [mm-generate]
387+
- put: magic-modules-new-prs
388+
params:
389+
status: failed
390+
context: chef-tests
391+
path: magic-modules-new-prs
345392

346393
- name: create-prs
347394
plan:
@@ -396,6 +443,7 @@ jobs:
396443
put: magic-modules-new-prs
397444
params:
398445
status: failure
446+
context: pr-creation
399447
path: mm-initial-pr
400448
# This will be a no-op the first time through the pipeline. This pushes the updated
401449
# branch named "codegen-pr-$MM_PR_NUMBER" to the downstream terraform repo. The

build/terraform

0 commit comments

Comments
 (0)