HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Github commit message when deploying to aws beanstalk in Jenkins

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
commitdeployingjenkinsmessagegithubbeanstalkawswhen

Problem

As part of our CI setup I am using AWS Beanstalk
deployment plugin to deploy my application through Jenkins.

The issue is I am getting git commit hash in beanstalk
application versions description.
I want to have the commit message instead.
I was able to output the message in Jenkins console output using the execute shell step.
but for some reason I can't seem to transfer it to beanstalk.
If I'm using eb deploy the description contains the commit message.
I am getting a blank description with ${ENV,var="MESSAGE"} in beanstalk.

Would appreciate any help on how to have the commit message
in beanstalk application versions.

Solution

This gives a short commit message

git show -s $GIT_COMMIT --format="format:%s"


I'd probably put this in the "Excute shell" command box

Hope this helps!

Code Snippets

git show -s $GIT_COMMIT --format="format:%s"

Context

StackExchange DevOps Q#3263, answer score: 1

Revisions (0)

No revisions yet.