Return Git commit message with Cloud Manager Pipeline Event | Community
Skip to main content
Level 2
August 3, 2021
Question

Return Git commit message with Cloud Manager Pipeline Event

  • August 3, 2021
  • 1 reply
  • 1860 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Employee
August 4, 2021

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

Level 2
August 4, 2021
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!