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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -