What properties are in Jenkins / Hudson available for build configuration?

53,168

Solution 1

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

Solution 2

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).

Solution 3

Updating the link to Jenkins WIKI: https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-below

https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables

Share:
53,168

Related videos on Youtube

Jens Schauder
Author by

Jens Schauder

Softwaredeveloper, Blogger, nitpick. Spring Data committer.

Updated on July 09, 2022

Comments

  • Jens Schauder
    Jens Schauder almost 2 years

    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.

  • nilesh
    nilesh over 8 years
    Execute shell helped in my case since I was looking for a custom env variable. Thanks so much
  • Rames Palanisamy
    Rames Palanisamy over 7 years
    Alternatively use SET in a windows batch command for the same result.
  • Chris F
    Chris F over 5 years
    in a groovy script, what are the properties available for "currentBuild" object?