Tomas, I don't think you can set a job's resultant status Better than it currently is. You can set it down. e.g. unstable->failure
On Tue, Mar 28, 2017 at 9:18 AM, Tomas Pekarovic <[email protected]> wrote: > HI, > > I have this post-buidl action: > > post { > always { > script { > if (currentBuild.result == 'UNSTABLE'){ > currentBuild.result = 'STABLE' > } > currentBuild.result = 'SUCCESS' > } > } > } > > > All i need is just to set build to SUCCESS even if it is UNSTABLE. > > JUNIT step produces currentBuild.result = UNSTABLE < this is ok.. > > at the end I need to change status to succes. I tried all possible > combinations. > If I do: > > post { > always { > script { > if (currentBuild.result == 'UNSTABLE'){ > currentBuild.result = 'SUCCESS' > } > } > } > } > > It does nothing and build is yellow.... > > If I do: > > post { > always { > script { > if (currentBuild.result == 'UNSTABLE'){ > currentBuild.result = 'STABLE' > } > } > } > } > > All steps change to green/blue (that is correct) but overal build is > FAILURE > > > I'm out of ideas and it seems to me as a bug. > > If I do nothing in postbuild full build is marked as 'UNSTABLE' > > thanks for any ideas > > -- > 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/f2eac395-838e-4421-b9b8-ec9a7308cc31%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/f2eac395-838e-4421-b9b8-ec9a7308cc31%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Dick Ginga Build Engineer [email protected] -- 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/CAL3PpaWLBkZQPWui_fCV-f5LgT46Cach1ojixN-sZi1L7wSs-Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
