[英]How to get the user id who triggers the pipeline in GitLab?
I am configuring a GitLab pipeline to build my project, in that I need a way by which I can retrieve the user id of the one who triggered the pipeline.我正在配置一个 GitLab 管道来构建我的项目,因为我需要一种方法来检索触发管道的用户 ID。 Is there any default variable which could help me to retrieve that value.
是否有任何默认变量可以帮助我检索该值。 I did tried CI_PIPELINE_USER_ID but it didn't return anything.
我确实尝试过 CI_PIPELINE_USER_ID 但它没有返回任何东西。
you can used:你可以使用:
GITLAB_USER_ID
- The ID of the user who started the job. GITLAB_USER_ID
- 启动作业的用户 ID。GITLAB_USER_LOGIN
- The username of the user who started the job. GITLAB_USER_LOGIN
- 开始作业的用户的用户名。GITLAB_USER_NAME
- The name of the user who started the job. GITLAB_USER_NAME
- 启动作业的用户名。 reference: Predefined variables reference |参考: 预定义变量参考 | GitLab
GitLab
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.