user3300816 user3300816 - 2 months ago 10
Groovy Question

In jenkins How to set a upstream build unstable from it's downstream build

I have a job that build a project and a downstream job that use some scripts to test that.

Is there any way to change result of a build from a downstream build?
I tried using groovy script as below but did not work:

Hudson.instance.items[10].getLastBuild().setResult(hudson.model.Result.UNSTABLE)

Answer

You can use parametrised build plugin. It allows you to have your downstream builds as build task. Your upstream build can fail if any of the downstream builds fail.

Comments