|
|
|
Using configuration.findVariables returns list of defined variables. I am still not clear what you mean in variables used?
I have a step with groovy script that uses variables from configuration, but vars.getAll returns empty collection. I have a repository that uses configuration variable in repository description, but vars.getAll returns empty collection. vars.getAll documentation looks confused because used is not mention. There are several examples everywhere also without mentioning it. Anyway configuration.findVariables suits my needs. Thank you for reply.
vars.getAll() only returns variables actually used in a build. If you want to access variables defined in a configuration, call configuration.findVariables() which will return a list of Variable instance
|
echo ${vars.getValue("someVar")}
Then "someVar" will be considered "used", and will appear in vars.getAll().