Dilu
Dilu

Reputation: 119

Azure Devops capture the user who triggered the pipeline `

Morning , I have a question , is their a way to capture who triggered the pipeline , it will happen automatically when some one commit in my master branch in GITHUB , in the devops GUI i see the below and I need to capture that userid so in case of any issue i will send an email

enter image description here

I tried using Build.QueuedBy, Build.QueuedById, Build.RequestedFor but for all i get some values like

this is Microsoft.VisualStudio.Services.TFS  variable for the username
this is 00000002-0000-8888-8000-000000000000  ID of the user

but I need to capture AMADURO so I can easily send email to [email protected] , any help appreciated , thanks

Upvotes: 3

Views: 6536

Answers (2)

Jerry
Jerry

Reputation: 124

Maybe your usage is wrong. $(Build.QueuedBy) will hold the name of the user who triggered the build like the below example.

enter image description here

Upvotes: 2

Alex
Alex

Reputation: 18556

Try Build.RequestedForEmail

See predefined variables

Upvotes: 6

Related Questions