1+ # CONFIG GENERATED BY DOTCOM-TOOL-KIT, DO NOT EDIT BY HAND
12version : 2.1
23orbs :
34 tool-kit : financial-times/dotcom-tool-kit@5
5+ cloudsmith-oidc : ft-circleci-orbs/cloudsmith-oidc@1.0
46executors :
57 node :
68 docker :
@@ -13,13 +15,26 @@ jobs:
1315 - checkout
1416 - tool-kit/persist-workspace :
1517 path : .
18+ teardown-review :
19+ executor : node
20+ steps :
21+ - tool-kit/attach-workspace
22+ - setup_remote_docker :
23+ docker_layer_caching : true
24+ - cloudsmith-oidc/authenticate_with_oidc
25+ - run :
26+ name : teardown-review
27+ command : npx dotcom-tool-kit teardown:review
28+ environment :
29+ CIRCLE_BRANCH : << pipeline.event.github.pull_request.head.ref >>
30+ CLOUDSMITH_ORGANISATION : financial-times
31+ CLOUDSMITH_SERVICE_ACCOUNT : cp-lifecycle-read-write
1632workflows :
1733 tool-kit :
18- when :
19- not :
20- equal :
21- - scheduled_pipeline
22- - << pipeline.trigger_source >>
34+ when : |
35+ pipeline.trigger_source != "scheduled_pipeline" and
36+ (pipeline.event.name == "push" or (pipeline.event.name == "pull_request"
37+ and pipeline.event.action != "closed"))
2338 jobs :
2439 - checkout :
2540 filters :
@@ -51,8 +66,6 @@ workflows:
5166 requires :
5267 - tool-kit/build
5368 filters :
54- tags :
55- only : /^v\d+\.\d+\.\d+(-.+)?/
5669 branches :
5770 ignore : main
5871 cloudsmith-org : financial-times
@@ -72,9 +85,6 @@ workflows:
7285 executor : node
7386 requires :
7487 - tool-kit/deploy-review
75- filters :
76- tags :
77- only : /^v\d+\.\d+\.\d+(-.+)?/
7888 - tool-kit/e2e-test-staging :
7989 executor : node
8090 requires :
@@ -126,3 +136,19 @@ workflows:
126136 ignore : main
127137 cloudsmith-org : financial-times
128138 cloudsmith-service-account : cp-lifecycle-read-write
139+ pr-close :
140+ jobs :
141+ - checkout :
142+ requires : []
143+ - tool-kit/setup :
144+ executor : node
145+ requires :
146+ - checkout
147+ - teardown-review :
148+ requires :
149+ - tool-kit/setup
150+ when : >
151+ pipeline.trigger_source != "scheduled_pipeline" and
152+
153+ (pipeline.event.name == "pull_request" and pipeline.event.action ==
154+ "closed")
0 commit comments