You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
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
Robert Hales
unread,
Oct 19, 2017, 3:59:41 PM10/19/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Jenkins Users
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: