<p>This gives a short commit message</p>

<pre><code>git show -s $GIT_COMMIT --format="format:%s"
</code></pre>

<p>I'd probably put this in the "Excute shell" command box</p>

<p>Hope this helps!</p>

CC BY-SA 3.0
2018-02-08T15:11:09.540Z
2018-02-08T15:11:09.540Z
Vorsprung
<p>As part of our CI setup I am using AWS Beanstalk
deployment plugin to deploy my application through Jenkins.</p>

<p>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 <code>${ENV,var="MESSAGE"}</code> in beanstalk.</p>

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

<p><a href="https://i.sstatic.net/DdSfN.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DdSfN.png" alt="pic1"></a>
<a href="https://i.sstatic.net/wxSvh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wxSvh.png" alt="pic2"></a>
<a href="https://i.sstatic.net/tCRt9.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tCRt9.png" alt="pic3"></a></p>

CC BY-SA 4.0
2018-06-09T09:12:03.110Z
export the COMMITMESSAGE and tick the "inject environment variables" in the first step?
Vorsprung
<jenkins><amazon-web-services><jenkins-plugins><github>
Github commit message when deploying to aws beanstalk in Jenkins
Amits
# Github commit message when deploying to aws beanstalk in Jenkins

(Asked by: username_0 on 2018-02-05)

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.

[![pic1](https://i.sstatic.net/DdSfN.png)](https://i.sstatic.net/DdSfN.png)
[![pic2](https://i.sstatic.net/wxSvh.png)](https://i.sstatic.net/wxSvh.png)
[![pic3](https://i.sstatic.net/tCRt9.png)](https://i.sstatic.net/tCRt9.png)

**Tags:** jenkins, amazon-web-services, jenkins-plugins, github

> **Comments:**
> **username_1**: export the COMMITMESSAGE and tick the "inject environment variables" in the first step?  

---

## 1 answers

### Answer by username_1 on 2018-02-08. Score: 1

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!


---

