# Trigger the jenkins job on specific commit

**URL:** <https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946>\
**Category:** Ask a question\
**Created:** [July 7, 2022, 6:58am UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946 "2022-07-07T06:58:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![technonies](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/technonies/32/1798_2.png) [@technonies](https://community.jenkins.io/u/technonies)\
**Post date:** [July 7, 2022, 6:58am UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946/1 "2022-07-07T06:58:09Z")

</div>

I’m working on declarative pipeline. I want to trigger the job on specific commit like **“Release to SIT”**. For this purpose, there was a plugin **“commit-message-trigger-plugin”** [https://plugins.jenkins.io/commit-message-trigger-plugin/](https://plugins.jenkins.io/commit-message-trigger-plugin/), which is suspended.

Is there any way to configure a Jenkins job to trigger a build on specific commit message?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [July 7, 2022, 8:00am UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946/2 "2022-07-07T08:00:08Z")

</div>

Hello @technonies and welcome to this community 👋

You could always download the plugin and install it manually, but it hasn’t been updated for 7 years.  
I think a `.sh` or `.bat` script file would be helpful for your use case, reading the commit message and deciding if you should build or not.  
Please have a look at :

- [https://levelup.gitconnected.com/tagging-jenkins-builds-with-git-commit-hashes-messages-f11703effa5b](https://levelup.gitconnected.com/tagging-jenkins-builds-with-git-commit-hashes-messages-f11703effa5b)
- [https://www.codegrepper.com/code-examples/shell/jenkins+get+last+commit+message](https://www.codegrepper.com/code-examples/shell/jenkins+get+last+commit+message)
- [https://stackoverflow.com/questions/58603411/how-to-access-git-commit-message-inside-sh-step-in-a-jenkins-pipeline](https://stackoverflow.com/questions/58603411/how-to-access-git-commit-message-inside-sh-step-in-a-jenkins-pipeline)

---

<div class="post-metadata">

**Author:** ![technonies](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/technonies/32/1798_2.png) [@technonies](https://community.jenkins.io/u/technonies)\
**Post date:** [July 10, 2022, 7:53pm UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946/3 "2022-07-10T19:53:42Z")

</div>

Thanks for your reply. I just write my own script to accomplish this task.  
Regards

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [July 10, 2022, 8:44pm UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946/4 "2022-07-10T20:44:30Z")

</div>

Thanks for your feedback.  
Good luck with your script.

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [July 11, 2022, 12:26am UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946/5 "2022-07-11T00:26:03Z")

</div>

> [@poddingue](#):
>
> You could always download the plugin and install it manually, but it hasn’t been updated for 7 years.

Actually you can’t in this case. Support for plugins not written in Java have been removed.

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [July 11, 2022, 7:55am UTC](https://community.jenkins.io/t/trigger-the-jenkins-job-on-specific-commit/2946/6 "2022-07-11T07:55:56Z")

</div>

Thank you Gavin, my bad.
