Access Jenkins Environment Variables in Java Program
问题 Is there any way to access jenkins environment variables (BUILD_NUMBER etc)in a java program without doing any changes in jenkins job. I am thinking if there is any listener (Jenkins or Maven) that I can hook into for getting jenkins enviroment variables and then I can set them as System properties and access anywhere in my java program. I came across EnvInject plugin but that would require job changes. I am looking for a solution where I can get access programmatically!! Ref: https://wiki