In Jenkins, how do builds know who requested them?

后端 未结 6 1151
南旧
南旧 2021-01-04 01:09

I need to pass the username of the requestor of a build down to the script that is actually doing the work. Looking at the console output for a particular build, the first

6条回答
  •  青春惊慌失措
    2021-01-04 01:20

    user30997

    Please check out Jenkins Build User Vars plugin, it does what you need:

    It is used to set following user build variables:

    • BUILD_USER – full name of user started build,
    • BUILD_USER_FIRST_NAME – first name of user started build,
    • BUILD_USER_LAST_NAME – last name of user started build,
    • BUILD_USER_ID – id of user started build.

提交回复
热议问题