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
Post a Comment