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


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


 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




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

3 thoughts on “Start Jenkins job from slack command

  1. A says:

    This is exactly how i configured the slash command.
    But I keep getting the “Darn – that slash command didn’t work (error message: `503_service_error`). Manage the command at text.”

    If i trigger the URL with curl, the build gets triggered though.

    Am i missing something?


Leave a Reply

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

You are commenting using your 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.