About
environment variable in Jenkins
Management
Create
Manage Jenkins > Configure System.
Then Global Properties
List
System
See: Manage Jenkins > System Information
Jenkins treats the PATH. variable in a case-sensitive way, and only “Path” is recognized as being the path variable.
Built-in
(Environment) Variable | In Mail | Example |
---|---|---|
BUILD_NUMBER | BUILD_NUMBER | 1 |
BUILD_ID | BUILD_ID | 2015-01-29_16-09-51 |
BUILD_URL | BUILD_URL | http://localhost:8080/jenkins/job/Test/1/ |
NODE_NAME | NODE_NAME | master |
JOB_NAME | JOB_NAME | Test |
BUILD_TAG | BUILD_TAG | jenkins-Test-1 |
JENKINS_URL | JENKINS_URL | http://localhost:8080/jenkins/ |
EXECUTOR_NUMBER | EXECUTOR_NUMBER | 0 |
JAVA_HOME | JAVA_HOME | /opt/java |
WORKSPACE | WORKSPACE | /root/.jenkins/jobs/Test/workspace |
SVN_REVISION | SVN_REVISION | 122558 |
CVS_BRANCH | ||
GIT_COMMIT | ||
GIT_URL | ||
GIT_BRANCH |
Example of Site URL for the mail:
$JENKINS_URL/job/$JOB_NAME/ws/target/site/index.html