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.


--
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/2aba0f35-1735-1d1d-b374-0956cac3dc44%40inteno.se.
For more options, visit https://groups.google.com/d/optout.

Reply via email to