DEV Community

Deepak Gupta
Deepak Gupta

Posted on

3 1

Triggering Jenkins Jobs From Slack

What about triggering your builds once you get an update from the Development Team on Slack and from their itself you triggered the job, so that all the needful can be done and reports added in your job configuration can be mailed back to developers!!!

So here we go :

  1. In Jenkins go to configure page and create API token, which helps you to configure your Job to Trigger Build remotely where you mention your token name.
    Alt Text
    Alt Text

  2. Coming to slack, in apps search for Slash Commands where you can configure and add to trigger build of your job from slack
    Alt Text

  3. In configuration, choose a command name of your choice and then click on add slash command integration.
    Alt Text

  4. Here you will make the entry in the URL mentioning your https://jenkins-user:token_no@jenkins_url/job/job_name/build?token=token_name
    Alt Text

  5. And at last, you can add an Autocomplete help task which helps you to find your added command easily while triggering, Click save. Go back to Slack and try run your command with the given name and your build will be triggered.

Alt Text
Alt Text
Alt Text

Hope You gonna try and make your builds easy to trigger. Keep Building

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay