Hello,

I'm still quite new to Jenkins, so please forgive my ignorance and these 
stupid questions:

I have a *declarative pipeline* for which I want to add a new test stage. 
This test result is interesting, but not overly important. 

Question 1: Would this be a use case for an *unstable *build result or how 
should I handle this situation instead?

Question 2: If so, what would be the best practice to set a build *unstable* 
in a declarative pipeline?

The one approach I could come up with would be a script {} block in which 
to perform a try/catch and to do something like: 

catch (ex) {
  echo "An error occured in satge 'Compare Databases'. Setting result to 
unstable."
  currentBuild.result = 'UNSTABLE'
}

Question 3: When using powershell scripts, what would be the best practice 
to inform the pipeline about errors in these scripts? Exit with error codes 
or throwing exceptions in the powershell scripts?

Thanks very much in advance,
zoc






-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/74e86401-44ef-44c1-9916-fdc27e52e160%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to