Skip to content

Commit 3f66436

Browse files
Merge branch 'main' into config-editor-gh-app
2 parents 4b6f3fc + ec37702 commit 3f66436

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/guides/modules/orchestrate/pages/workflows.adoc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,31 @@ image::guides:ROOT:workflow-using-requires-example-1.png[Flexible Job Execution
184184
image::guides:ROOT:workflow-using-requires-example-2.png[Flexible Job Execution Workflow - Example 2]
185185

186186

187+
You may want to configure job dependencies that ignore the status/outcome of an upstream job.
188+
189+
In the following example, the dependent job will run once the upstream job attains a terminal state, regardless of the status/outcome:
190+
191+
.Use flexible requires to ignore outcome of a job
192+
[source,yaml]
193+
----
194+
workflows:
195+
test-and-cleanup:
196+
jobs:
197+
- build
198+
- test:
199+
requires:
200+
- build
201+
- cleanup:
202+
requires:
203+
- test:
204+
- success
205+
- failed
206+
- canceled
207+
----
208+
209+
* The `test` job waits for the `build` job, and only runs if the `build` job is successful.
210+
* The `cleanup` job waits for the `test` job, and runs regardless of whether the `test` job succeeds, fails, or is canceled.
211+
187212
TIP: Refer to the xref:reference:ROOT:configuration-reference.adoc#requires[Requires] section of the configuration reference.
188213

189214
[#holding-a-workflow-for-a-manual-approval]

0 commit comments

Comments
 (0)