문제

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)
도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top