groovy - Retrieve all properties of env in Jenkinsfile -


i print available properties (and values) in env object inside jenkinsfile.

when do

print env 

i get:

org.jenkinsci.plugins.workflow.cps.envactionimpl@112cebc2 

so looks tostring not implemented there, how can access properties in object if don't know names?

make sure you're not running pipeline script in sandboxed mode , should able use:

env.getenvironment() 

note, if you're running in sandbox mode in pipeline, should approve method @ script approval page: http://jenkins-host/scriptapproval/


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -