There are a lot of different ways to do this, but it depends on how your 
pipeline script is written, whether you are using declarative or scripted 
pipeline, what do you want to do when it is null vs. not. In a scripted 
pipeline this is a basic programming question: 

if (params.FOO) {

} else {

}


On Thursday, October 19, 2017 at 10:24:23 AM UTC-6, jbr...@snapapp.com 
wrote:
>
> Hi all,
>
> Let's say I have a Jenkinsfile for a job that is normally built with Build 
> Parameters, and so has params.FOO in it. Then let's say that I want to also 
> be able to automatically build this using a  ultibranch pipeline job. 
> Obviously, params.FOO will be undefined, causing the job to fail; is it 
> possible to write the Jenkinsfile to check if a variable is undefined?
>
> Thanks!
> Jack
>

-- 
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/d36d4f8c-2605-4c23-8980-6660e8226d8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to