Hi!
Process Automation (formerly “Rundeck Enterprise”) includes the Ruleset Strategy, it’s perfect for that use case.
Another approach is to use The Job Reference Step aimed at your target jobs. i.e:
We need to run three jobs: JobA, JobB, and JobC.
JobA:
- defaultTab: nodes
description: ''
executionEnabled: true
id: 23a8fc6c-de30-42d1-b10a-9d46f017b3dc
loglevel: INFO
name: JobA
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- exec: echo "I am the Job A"
keepgoing: false
strategy: node-first
uuid: 23a8fc6c-de30-42d1-b10a-9d46f017b3dc
JobB (containing an intentional failure for testing proposes):
- defaultTab: nodes
description: ''
executionEnabled: true
id: 55020128-f630-45e9-a956-dfe4258a15ec
loglevel: INFO
name: JobB
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- exec: echo "I am the Job B"
keepgoing: false
strategy: node-first
uuid: 55020128-f630-45e9-a956-dfe4258a15ec
JobC:
- defaultTab: nodes
description: ''
executionEnabled: true
id: 3d5794ef-be09-4c2a-a8fd-106e4712593c
loglevel: INFO
name: JobC
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- exec: echo "I am the Job C"
keepgoing: false
strategy: node-first
uuid: 3d5794ef-be09-4c2a-a8fd-106e4712593c
And the Parent Job, to run your target jobs (set the strategy: sequential and set “If a step fails” > “Run remaining steps before failing.” ):
- defaultTab: nodes
description: ''
executionEnabled: true
id: cad1e7bf-84f8-4a24-8ea8-ff904fbf97af
loglevel: INFO
name: ParentJob
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- jobref:
group: ''
name: JobA
nodeStep: 'true'
uuid: 23a8fc6c-de30-42d1-b10a-9d46f017b3dc
- jobref:
group: ''
name: JobB
nodeStep: 'true'
uuid: 55020128-f630-45e9-a956-dfe4258a15ec
- jobref:
group: ''
name: JobC
nodeStep: 'true'
uuid: 3d5794ef-be09-4c2a-a8fd-106e4712593c
keepgoing: true
strategy: sequential
uuid: cad1e7bf-84f8-4a24-8ea8-ff904fbf97af
Check the result here.
You can import these jobs to test in your environment, take a look at this.
Hope it helps!