Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get the status of a previous stage build in Jenkins pipeline?

Tags:

I have a Jenkins job, that uses the pipeline mechanics. It has several steps. For understanding let's assume I have 3 stages. the first 2 run in parallel, the 3rd after them. Now depending on the result of the last build of stage 3 I want to do different thing. If stage 3 was previously successful, I want the result from stage 1, otherwise take stage 2 result. Is this possible to check? I don't get how to retrieve the last result of a stage, only did a similiar thing for last state of a job.

like image 876
Matthias Avatar asked Apr 04 '16 12:04

Matthias


People also ask

What is used to track the changes between builds in Jenkins?

The simplest way to know what has changed on your Jenkins builds! Last Changes is a Jenkin plugin that shows rich VCS diffs between builds.


1 Answers

  1. Write output from only succesfull job, no need to check then
  2. I've not heard stage status, you've to break your stages into separate jobs and then use 'job status'
like image 126
SACn Avatar answered Sep 18 '22 13:09

SACn