Is there a way to pass the status of a job to another job? What i need is I have job1 which run tests in parallel. If it fails it sends reports to slack from each container. So we are getting multiple notification for single test run. As a workaround what i tried is i created a job2 which checks the status of the workflow if it is ‘failing’ or ‘running’ through API and job2 sends one single slack notification if tests are failed. As per the docs, if one of the job in a workflow fails it should return the status ‘failing’ but it is not happening, even though job1 fails and while job2 is running the status of the workflow is always ‘running’. Now my options are
- Store the status of job1 in a variable and pass it to job2. Not sure if it is possible!!
- Or, find the status of job1 from job2 through any API calls. is it possible?
Are there any other simple solution to resolve my issue?
I thank in advance for your help