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

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

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