Hi,
Given the following partial configuration, how can I make job2
execute no matter the status of job1
?
jobs:
job1: ...
job2: ...
workflows:
main:
jobs:
- job1
- job2:
requires:
- job1
Hi,
Given the following partial configuration, how can I make job2
execute no matter the status of job1
?
jobs:
job1: ...
job2: ...
workflows:
main:
jobs:
- job1
- job2:
requires:
- job1
Hi @gempain! Thanks for coming back to the community. I would start with this post, which I think is trying to do the same thing. If that doesn’t address it, maybe you can explain some of the differences so we can investigate more.
Hi there, thanks for the reply. Yup, sounds like that thread is trying to do the same, but I feel like the example I gave is a little more straight forward.
I was aware that you could use when: always
on a step
inside a job
, but that’s not what I’m looking for. What I want, is a way to say job2
should be executed after job1
is done, no matter the output of job1
(both on success or failure to be more accurate).
I’ll give you an example use case to show you why when: always
at the step
level isn’t sufficient. Say we have 3 jobs:
job1
runs tests in a node:11
Docker imagejob2
runs tests in a node:12
Docker imagejob3
sends a notification webhook with the status of the buildI want job3
to be executed after job1
AND after job2
, whether one of them failed or not, because I’d like to send a webhook somwhere to say something like all jobs passed
or some jobs failed
.
I think I understand. Let me look into it and I’ll try to respond ASAP.
Update:
@gempain This is not possible at the moment, but you can upvote this idea here to help us prioritize it. Thanks!
Is this possible now?
This is in development, you can give feedback on Nathan’s post here.