AAA="aaaaaaaa" echo AAA echo "$AAA" https://stackoverflow.com/questions/37425064/how-to-use-environment-variables-in-a-groovy-function-using-a-jenkinsfile