Skip to content

Commit 5c85c10

Browse files
authored
ci: fix workflow triggering on tag + matrix parameters (#1827)
1 parent a690386 commit 5c85c10

File tree

1 file changed

+19
-93
lines changed

1 file changed

+19
-93
lines changed

.circleci/config.yml

Lines changed: 19 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -317,114 +317,40 @@ workflows:
317317
docker-master-commit:
318318
jobs:
319319
- docker-build:
320-
name: docker_build_trin
321-
target: trin
320+
name: docker_build__<< matrix.target >>
322321
tags: latest
322+
matrix:
323+
parameters:
324+
target: ["trin", "bridge", "e2hs-writer", "trin-execution"]
323325
- docker-publish:
324-
name: docker_publish_trin
325-
target: trin
326+
name: docker_publish__<< matrix.target >>
326327
requires:
327-
- docker_build_trin
328+
- docker_build__<< matrix.target >>
328329
filters:
329330
branches:
330331
only: master
331-
- docker-build:
332-
name: docker_build_bridge
333-
target: bridge
334-
tags: latest
335-
- docker-publish:
336-
name: docker_publish_bridge
337-
target: bridge
338-
requires:
339-
- docker_build_bridge
340-
filters:
341-
branches:
342-
only: master
343-
- docker-build:
344-
name: docker_build_e2hs_writer
345-
target: e2hs-writer
346-
tags: latest
347-
- docker-publish:
348-
name: docker_publish_e2hs_writer
349-
target: e2hs-writer
350-
requires:
351-
- docker_build_e2hs_writer
352-
filters:
353-
branches:
354-
only: master
355-
- docker-build:
356-
name: docker_build_trin_execution
357-
target: trin-execution
358-
tags: latest
359-
- docker-publish:
360-
name: docker_publish_trin_execution
361-
target: trin-execution
362-
requires:
363-
- docker_build_trin_execution
364-
filters:
365-
branches:
366-
only: master
332+
matrix:
333+
parameters:
334+
target: ["trin", "bridge", "e2hs-writer", "trin-execution"]
367335
docker-master-tag:
368-
when:
369-
and: [ << pipeline.git.tag >>, << pipeline.git.branch.is_default >> ]
336+
when: << pipeline.git.tag >>
370337
jobs:
371338
- docker-build:
372-
name: docker_build_trin
373-
target: trin
374-
tags: << pipeline.git.tag >>-$(git rev-parse --short HEAD) stable prod
375-
filters:
376-
tags:
377-
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
378-
- docker-publish:
379-
name: docker_publish_trin
380-
requires:
381-
- docker_build_trin
382-
target: trin
383-
filters:
384-
tags:
385-
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
386-
- docker-build:
387-
name: docker_build_bridge
388-
target: bridge
389-
tags: << pipeline.git.tag >>-$(git rev-parse --short HEAD) stable prod
390-
filters:
391-
tags:
392-
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
393-
- docker-publish:
394-
name: docker_publish_bridge
395-
requires:
396-
- docker_build_bridge
397-
target: bridge
339+
name: docker_build__<< matrix.target >>
398340
filters:
399341
tags:
400342
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
401-
- docker-build:
402-
name: docker_build_e2hs_writer
403-
target: e2hs-writer
404343
tags: << pipeline.git.tag >>-$(git rev-parse --short HEAD) stable prod
405-
filters:
406-
tags:
407-
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
344+
matrix:
345+
parameters:
346+
target: ["trin", "bridge", "e2hs-writer", "trin-execution"]
408347
- docker-publish:
409-
name: docker_publish_e2hs_writer
348+
name: docker_publish_trin__<< matrix.target >>
410349
requires:
411-
- docker_build_e2hs_writer
412-
target: e2hs-writer
413-
filters:
414-
tags:
415-
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
416-
- docker-build:
417-
name: docker_build_trin_execution
418-
target: trin-execution
419-
tags: << pipeline.git.tag >>-$(git rev-parse --short HEAD) stable prod
350+
- docker_build__<< matrix.target >>
420351
filters:
421352
tags:
422353
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
423-
- docker-publish:
424-
name: docker_publish_trin_execution
425-
requires:
426-
- docker_build_trin_execution
427-
target: trin-execution
428-
filters:
429-
tags:
430-
only: /^v\d+(\.\d+){0,2}(-\w*\.\d+)?$/
354+
matrix:
355+
parameters:
356+
target: ["trin", "bridge", "e2hs-writer", "trin-execution"]

0 commit comments

Comments
 (0)