4
votes

I've been searching over the web from yesterday about this and can't find a proper answer so I was wondering if there is someone over here that might help me to answer to my problem also to say me it's impossible at the moment to retrieve this information.

As the title I wrote, I have a pipeline in Jenkins which connects 3-4 jobs and everything runs perfectly and sequentially. It is made like this, just to be clear: JOB1 -> JOB2 -> JOB3.

All I want to know, and I can't find, is if there is a way to check the build pipeline status itself. Do Jenkins maintains this information? Like... I would be able to know when the pipeline is finished: Pseudo: if pipeline is finished then do something ... end

1
If you always run the pipeline jobs in the same sequence, isn't it enough to just check whether build 3 is finished ?gareth_bowles
Yeah it's what I thought too. This can be a first solution. But what if the pipeline stops before? EDIT: Imagine, BUILD1-BUILD2-BUILD3 . We don't reach BUILD3. We stop at BUILD2. Pipeline finishes. I need to know it is finished. Imagine it existes a BUILD_PIPELINE_STATUS to retrieve the status form, you would have check it and receive "Pipeline Ended for an error". I mean, do am I explaining myself? How can I control this behaviour? I hope I've been clear enough! Thanks everyone againsc1789
So no hints on how to do this? I guess it might be not implemented feature yet.sc1789

1 Answers

3
votes

Just an idea. You can add something at the end of the build script, then when the build is finished, you will get the thing you added.