Perhaps the following snippet is something that you are looking for:
node {
stage('Build') {
build job: 'test-a', propagate: true
build job: 'test-b', propagate: true
}
}
By default propagate is set to true, so this is just to illustrate that you
can ignore errors and failures.
You also need to make sure that in the jobs you invoke (test-a and test-b
in this case) you need to clearly mark successes and failures as such.
node {
currentBuild.result = "SUCCESS"
}
Hope this helps.
On Thursday, November 10, 2016 at 10:17:46 AM UTC-8, pradeep kumar wrote:
>
> Hi All,
>
> I have three jobs (Build, deploy and test ) .Builds job will trigger for
> every one hr and generate the war . then it deploy job will trigger and
> deploy on test env and at last test job will trigger .
> Build-->Deploy-->Test
>
> But i want to trigger the Builds job based on success of Test job . If
> Test job is failure or unstable , my Build should not trigger . Only if
> Test job is success then the Build job has to triggger .
>
> My Build has scheduled for every hr .
>
> Please suggest me .
>
>
> Thanks in advance.
> pradeep
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/28e735d8-f309-4505-b677-8b3010cfc85f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.