Is there anyway to watch batch together two steps → I want a trigger step and a command step to fire off asynchronously but the command step should wait on the trigger step to finish.
Is there any way to batch these two steps together?
The rest of the pipeline should continue without waiting on these.
Sorry @yeswecan95, I’m not sure what you’re trying to do. Could you help with an example?
You can have the command step depend on the trigger step and so wait for it to finish, or you can have them run at the same time. I’m not sure what waiting on another step to finish means if you also want them to run at the same time?
Let’s say I have a pipeline running → I want to run an async command x somewhere in this pipeline. And, if x finishes, I want to run a command y. If x does not finish, I do not want to run command y. The remainder of the pipeline should work as normal. X is a trigger step and y is a command step. Is this possible without having to create a new pipeline for x and y?
steps:
- command: will always run
- trigger: some-pipeline
key: some-pipeline-trigger
- command: only-after-trigger
depends_on: some-pipeline-trigger
- command: will also always run
The first and last command will always run immediately, and so will the trigger. The middle command will only run after the triggered build has passed. Is that kinda what you’re after?
You can add async: true to the trigger if you like! The only difference that will make is whether the pipeline waits fo the triggered build to complete before running the subsequent command or if it proceeds immediately once the triggered build has been created.
i want z to only trigger after y but i want y, z together to be asynchronous. E.g. it goes x,
(async) y->z, w but z should only trigger if y completes.