Start Jenkins job from slack command

Slack is one of popular communication open source tool. Many team use it for work.

If your project has  Jenkins server and development team want build/run test via Slack command, this post maybe helpful.

The first you need install jenkins plugin: Build Token Root Plugin

screen-shot-2017-02-21-at-18-02-51

Then Enabled Trigger builds remotely in your Jenkins job like screenshot below:

screen-shot-2017-02-21-at-18-05-49

 So from now you can “Use the following URL to trigger build remotely: JENKINS_URL/job/JmeterSample/build?token=TOKEN_NAME or /buildWithParameters?token=TOKEN_NAME
Optionally append &cause=Cause+Text to provide text that will be included in the recorded build cause.” 

 

In slack, Go to Slack integration page set like screenshot below

screen-shot-2017-02-21-at-18-11-41

 

 

-> Now you can use command /sample in slack to start this jenkins job

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.