Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Return Git commit message with Cloud Manager Pipeline Event

jasonhampleman
Level 2
Level 2

I have successfully integrated Cloud Manager Pipeline events with Slack.  I get Slack notices when a Pipeline is started or ended.  Now I'd like to have useful information about the deployment returned.  Example:  I'd like the latest Commit message(s) to be sent when the Pipeline starts.  That way I know via Slack which code is being deployed in the Pipeline job.  Is this possible?  I was unable to find an endpoint that returns Git commit information in the docs.

1 Reply
justin_at_adobe2
Employee
Employee

@jasonhampleman this is possible for production pipelines. The artifactsVersion property of a pipeline execution will contain the tag name which Cloud Manager automatically generates. In your webhook, you can thus use a git client (I've used https://github.com/isomorphic-git/isomorphic-git in the past for this kind of thing) to get the commit associated with that tag. I'll doublecheck if there's an open feature request for adding the commit hash to the execution representation -- that would be necessary to do the same for non-production pipelines. If not, I'll create one on your behalf.

jasonhampleman
Level 2
Level 2
This is great! I was able to associate an artifactsVersion Tag with a specific Commit in our Git history. That definitely helps us see which pipeline execution relates to which commit. The hash connection you mention would be even better. Thanks!