Reputation: 559
Is it possible to read the actual GIT commit message inside an Azure build pipeline?
Upvotes: 11
Views: 9359
Reputation: 41715
You have a pre-defined variable with the commit message:
Build.SourceVersionMessage
The comment of the commit or changeset for the triggering repo. This variable is agent-scoped, and can be used as an environment variable in a script and as a parameter in a build task, but not as part of the build number or as a version control tag. Also, this variable is only available on the step level and is neither available in the job nor stage levels (i.e. the message is not extracted until the job had started and checked out the code).
Upvotes: 27