简体   繁体   English

如何获取GitLab中触发管道的用户id?

[英]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.

相关问题 Gitlab 管道 - 如何获取管道运行的日期/月份? - Gitlab piepline - how to get a day/month the pipeline is running? 对于我的 android 应用程序,如何查看或过滤特定用户 ID 的 Firebase 事件以及如何获取触发事件的所有用户 - For my android app , How to watch or filter Firebase event for specific user ID and How to get all all users who have triggered a event 当 gitlab CI/CD 触发时,如何通过 git 而不是从预定义的变量获取提交标签 - How to get the commit TAGS, via git and not from predefined vars, when gitlab CI/CD triggers 如何在 Vertex AI 管道中获取 model id? - How do I get a model id in a a Vertex AI pipeline? 如何在 GitLab CI 的管道中获取先前阶段/作业的结果(成功或失败)? - How to get the results (succeeded or failed) of previous stages/jobs in a pipeline of GitLab CI? 在 Gitlab CI 管道中的每个环境中使用不同的 Azure 订阅 ID - Use different Azure Subscription ID per environment in a Gitlab CI pipeline 如何在没有 firebase 身份验证的情况下获取用户 ID? - how to get the user ID without firebase authentication? 在 Gitlab CI/CD 管道上获取最新的 git 标签 - Get latest git tags on Gitlab CI/CD pipeline 为 GitLab 管道安全地检索 Azure 租户 ID、客户端 ID 和客户端密码 - Retrieving Azure Tenant ID, Client ID and Client Secret Securely for GitLab Pipeline 在管道步骤中获取 Sagemaker 管道执行 ID - Get Sagemaker pipeline execution id within pipeline steps
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM