On 2017-04-28 13:38, Kenneth Johansson wrote:
I want to test if a property on a job exist att all. and then do something depening on if it true or false.

if the property exist there is no issue testing if its true or false but I do not want to force the job to have to create the property so I want to test if the variable exist and that fails as it is always false all the time.

if ( getBinding().hasVariable("my_param") ) {
    echo "YES"
 } else {
    echo "NO"
 }


also I wanted to getVaraiable to get it but that is not allowed.


What I really want to do is having a list of possible boolean parameters and convert that to list of parameters that contain only the ones set to true.


--
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/d9016bc2-a1fc-8111-a459-302484ed6a2a%40inteno.se.
For more options, visit https://groups.google.com/d/optout.

Reply via email to