anamika email
anamika email

Reputation: 347

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. 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.

Upvotes: 3

Views: 9353

Answers (1)

Mouson Chen
Mouson Chen

Reputation: 1224

you can used:

  • GITLAB_USER_ID - The ID of the user who started the job.
  • GITLAB_USER_LOGIN - The username of the user who started the job.
  • GITLAB_USER_NAME - The name of the user who started the job.

reference: Predefined variables reference | GitLab

Upvotes: 6

Related Questions