22

The question is in the title

I know about BUILD_NAME and BUILD_ID and BUILD_TAG and I have seen somewhere a list of properties, but I can't find it anymore.

0

3 Answers 3

42

There is

  • a quite extensive list in the JENKINS wiki (or if you prefer in the Hudson Wiki,
  • there is a link to it below the textarea where you specify your build steps (see below)
  • you could run
    env
    as bash script in a build step to find out which additional variables are inherited on your system:

enter image description here

3
  • Execute shell helped in my case since I was looking for a custom env variable. Thanks so much
    – nilesh
    Nov 12, 2015 at 16:41
  • Alternatively use SET in a windows batch command for the same result.
    – cori
    Jan 5, 2017 at 16:40
  • in a groovy script, what are the properties available for "currentBuild" object?
    – Chris F
    Nov 5, 2018 at 20:27
13

To view available env vars in your case (since they also depend on installed plugins) just go to this URL:

https://<your-jenkins>/env-vars.html

Replace https://<your-jenkins>/ with how you used to access your Jenkins (it can be, just for instance http://localhost:8080/env-vars.html or https://linux-jenkins-1:8443/env-vars.html).

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.