https://github.com/jenkinsci/build-user-vars-plugin
Set of environment variables that describe the user who started the build
https://github.com/jenkinsci/build-user-vars-plugin
email jenkins jenkins-plugin parameter properties runcondition triggers user user-information variables
Last synced: 5 months ago
JSON representation
Set of environment variables that describe the user who started the build
- Host: GitHub
- URL: https://github.com/jenkinsci/build-user-vars-plugin
- Owner: jenkinsci
- Created: 2012-02-14T18:49:35.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2025-05-06T18:43:47.000Z (5 months ago)
- Last Synced: 2025-05-06T19:47:34.062Z (5 months ago)
- Topics: email, jenkins, jenkins-plugin, parameter, properties, runcondition, triggers, user, user-information, variables
- Language: Java
- Homepage: https://plugins.jenkins.io/build-user-vars-plugin
- Size: 210 KB
- Stars: 47
- Watchers: 100
- Forks: 47
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Build User Vars Plugin
[](https://ci.jenkins.io/job/Plugins/job/build-user-vars-plugin/job/master/)
[](https://ci.jenkins.io/job/Plugins/job/build-user-vars-plugin/job/master/coverage)
[](https://github.com/jenkinsci/build-user-vars-plugin/graphs/contributors)
[](https://plugins.jenkins.io/build-user-vars-plugin)
[](https://github.com/jenkinsci/build-user-vars-plugin/releases/latest)
[](https://plugins.jenkins.io/build-user-vars-plugin)Set of **environment variables** that describe the user who started the build.
## Variables provided
The plugin provides the following environment variables:
| Variable | Description |
|--------------------------|------------------------------------|
| BUILD\_USER | Full name (first name + last name) |
| BUILD\_USER\_FIRST\_NAME | First name |
| BUILD\_USER\_LAST\_NAME | Last name |
| BUILD\_USER\_ID | Jenkins user ID |
| BUILD\_USER\_GROUPS | Jenkins user groups |
| BUILD\_USER\_EMAIL | Email address |## Since 1.8
Set the global option to add build user variables to the environment for all builds (in **Manage Jenkins, Configure System**).
## Usage example
Select *Set Jenkins user build variables* and reference the variables during the build:

## Pipeline Examples
```groovy
node {
withBuildUser {
def user = env.BUILD_USER_ID
}
}
```or with declarative option:
```groovy
options {
withBuildUser()
}
```## Changelog
Release notes are available in [GitHub Releases](https://github.com/jenkinsci/build-user-vars-plugin/releases) since July 2020 (build-user-vars plugin 1.6 and later).
Prior release notes are available in the plugin repository [changelog](https://github.com/jenkinsci/build-user-vars-plugin/blob/master/CHANGELOG.md).