简体   繁体   中英

Jenkins: Gerrit event trigger plugin

Need some help. Do we have any option to filter specific users for Gerrit event plugin. currently its triggering for all which i don't want to trigger for every one in the team.

You can't configure the Gerrit Trigger plugin to trigger only for some specific users but you can use a workaround to accomplish something like this.

When the job is triggered by Gerrit Trigger plugin some environment variables are automatically set. The more useful in your case are:

  • GERRIT_CHANGE_OWNER_NAME
  • GERRIT_CHANGE_OWNER_EMAIL
  • GERRIT_PATCHSET_UPLOADER_NAME
  • GERRIT_PATCHSET_UPLOADER_EMAIL
  • GERRIT_EVENT_ACCOUNT_NAME
  • GERRIT_EVENT_ACCOUNT_EMAIL

You can check some of these variables and abort the build if he/she isn't one of the specific users.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM