Question

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)
Était-ce utile?

La solution

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.

Autres conseils

In the job configuration, section "Post build actions", there's an "Aggregate downstream test results" option.

According to the help:

Because tests often dominates the execution time, a Hudson best practice involves splitting test executions into different jobs, possibly in multiple different jobs.

When you do that, setting test aggregation is a convenient way of collecting all the test results from such downstream test jobs and display it along with the build that they are testing. In this way, people can see the overall test status of the given build quickly.

That should do what you need.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top