Hi Michael,

1.    thanks for your response! I reckon that 
JENKINS-45579<https://issues.jenkins-ci.org/browse/JENKINS-45579> too is one of 
the issues regarding this.

I was hoping for something similar to "Exit code to set build unstable" in the 
"Execute shell" build step. Guess I'll have to wait then :)

Best regards
  Steffen

From: [email protected] 
[mailto:[email protected]] On Behalf Of Michael Pailloncy
Sent: Thursday, July 20, 2017 12:22 AM
To: [email protected]
Subject: Re: [Pipeline] Mark single step/script as UNSTABLE

To my knowledge, it's not possible to change the result of a single step. 
However, you can check the result code of your script and then set the result 
of the entire pipeline to UNSTABLE using returnStatus parameter, available for 
sh, powershell and bat 
steps<https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/>.

Alternatively, it's planned to have the ability to change the status of a 
single stage : see 
JENKINS-26522<https://issues.jenkins-ci.org/browse/JENKINS-26522>
The scope of this issue is wider than your need though, but it's in progress :-)


2017-07-19 15:42 GMT+02:00 Breitbach, Steffen 
<[email protected]<mailto:[email protected]>>:
Hi everyone!

Is there a way to mark a single step (or script) in a declarative Jenkins 
pipeline as "UNSTABLE"?

I know how to mark the entire pipeline as UNSTABLE and how to mark a single 
step as FAILED instead of STABLE, but that's not what I need.

Something like "currentStep.result = 'UNSTABLE'" would be handy.

I haven't found something yet, assuming there isn't a solution for this, but I 
thought I'll give it a shot and try asking here...

Best regards
  Steffen

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5E63738AB9896844AF1601A1D094677317A6BF6B%40SMBXKO2.cgm.ag<https://groups.google.com/d/msgid/jenkinsci-users/5E63738AB9896844AF1601A1D094677317A6BF6B%40SMBXKO2.cgm.ag?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPO77c2nbzM_gK9tO3oiiRyhNJdi%2BpdGGPNr-2EFNmWwPxuMjg%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CAPO77c2nbzM_gK9tO3oiiRyhNJdi%2BpdGGPNr-2EFNmWwPxuMjg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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/5E63738AB9896844AF1601A1D094677317A6C130%40SMBXKO2.cgm.ag.
For more options, visit https://groups.google.com/d/optout.

Reply via email to