Jenkins build notifications in Mattermost

Post Jenkins build results to a self-hosted Mattermost channel using the Mattermost Notification plugin, an incoming webhook and the mattermostSend pipeline step, after checking that the plugin is current enough for your Jenkins.

On this page

Jenkins build notifications in Mattermost: what the integration does

A team that wants build results in a Mattermost channel without polling Jenkins should use the Mattermost Notification plugin for Jenkins, which posts build events to an incoming webhook on the self-hosted Mattermost server. The plugin pushes each result to the channel as the build finishes, so nobody has to watch the Jenkins dashboard or script a poll. Before you rely on it, check the plugin's age and compatibility, because a notification plugin that falls behind the Jenkins core can break quietly after an upgrade.

The plugin covers two usage patterns. Freestyle jobs use a post-build action that you add in the job configuration, which is the simplest route for existing jobs. Jenkins Pipeline projects use the mattermostSend pipeline step, which the plugin supports from version 2.0, so notifications can sit in the same Jenkinsfile as the build, test and deploy stages and carry the stage results that matter to your team. Both paths depend on the same incoming webhook, so the webhook design decides which channel receives messages, under which name, and who can change that setup.

Confirm three things with your own environment before you commit to this design. First, check the plugin page's current version and the minimum Jenkins core it requires, since the plugin page lists version 3.1.3 requiring Jenkins 2.190.1 at the time of research, and your controller may already be newer or older than that. Second, confirm that your Mattermost server and its incoming webhook settings are enabled for the integration you plan to use. Third, decide whether a plugin maintained by a third party meets your change control and patch policy, since Jenkins plugins run inside the controller that holds your build credentials. The Jenkins plugin page for Mattermost Notification is the place to start that check.

What you need before connecting Jenkins to Mattermost

Four things have to be in place before the plugin can post anything: a Mattermost server you can reach, a Jenkins controller that meets the plugin's requirements, a network path between them, and trust for the certificate Mattermost presents. Each card below is a check to complete and record before you configure a webhook or a pipeline step.

Mattermost server and channel access

Confirm which Mattermost server version your team runs, then check it against the compatibility the plugin page documents before you rely on it. Mattermost publishes monthly server releases and Extended Support Releases, so the version in production may differ from the one a plugin was tested against. Also confirm that a Mattermost user with permission to create incoming webhooks can access the target channel, and that the channel exists before you wire it into Jenkins. The Mattermost version check is the step most teams skip.

Server releases

Jenkins controller at a supported version

The Mattermost Notification plugin's page lists version 3.1.3 as requiring Jenkins 2.190.1. Check your controller's version against that minimum and confirm the plugin version you intend to install. Pipeline support with the mattermostSend step starts at plugin version 2.0, so a freestyle-only setup can use an older plugin, but a pipeline setup should not. Record the controller version in your change request, since an upgrade of Jenkins later may change which plugin versions remain compatible.

Plugin page

Outbound path from Jenkins to Mattermost

The plugin posts to the Mattermost incoming webhook URL over HTTP or HTTPS, so the Jenkins controller and any agents that run notification steps must reach the Mattermost server address on the required port. Check firewall rules, egress proxies and DNS resolution from the Jenkins host itself, not from your workstation. In segmented networks, this path often crosses a boundary that needs a change request, so start that request early.

Certificate trust for internal CAs

If Mattermost is served with a certificate issued by an internal certificate authority, the Jenkins Java runtime must trust that CA or the webhook call fails during TLS validation. Obtain the root and intermediate certificates from your PKI team and import them into the truststore that Jenkins uses, then test with a single manual request from the Jenkins host. Do not disable certificate verification to get past the error, because the webhook URL carries a secret that grants posting rights to the channel.

Webhook secret handling

An incoming webhook URL works as a credential. Anyone who holds it can post into the channel, so decide who in your organization may create it and where it will be stored in Jenkins. Use the Jenkins credentials store where your plugin version supports it, restrict access to the credential, and plan a rotation step in case the URL is exposed in logs or a shared job definition.

Notification ownership and scope

Name the team that owns the channel and the Jenkins jobs that post to it before you start. Decide which jobs notify, which events they report, and who responds to a failed notification. Unowned webhooks tend to outlive the jobs that created them, and a channel full of stale build posts makes real failures harder to see.

How to configure the Mattermost Notification plugin step by step

This sequence takes a Jenkins controller from a version check to a verified test message in a Mattermost channel, with the webhook kept out of job configuration. Each step ends with a check you can run before moving on.

  1. Confirm plugin and Jenkins versions

    Before installing anything, the Jenkins administrator checks the Mattermost Notification plugin page and compares its stated Jenkins requirement with the version running on the controller. The plugin page lists version 3.1.3, which requires Jenkins 2.190.1 or later, so an older controller must be upgraded first. Also confirm that the plugin's last release date is recent enough for your Jenkins and Mattermost versions, since the plugin is community-maintained. You know this step is done when you have written down the plugin version you intend to install and the Jenkins version it runs on.

  2. Create an incoming webhook in the target channel

    A Mattermost system administrator or a user with permission to manage integrations creates an incoming webhook in the channel that should receive build results. The webhook is bound to that channel, so choose a dedicated channel such as one for CI results rather than a busy general channel. Copy the generated webhook URL once and treat it as a secret, because anyone holding it can post to the channel. You know this step is done when the webhook appears in the channel's integration list and you hold its URL in a password manager or secrets store.

  3. Install the Mattermost Notification plugin

    A Jenkins administrator installs the Mattermost Notification plugin from the plugin manager, using the version confirmed in the first step, and restarts Jenkins if the installer asks for it. Install it only from the official Jenkins plugin index, and record the installed version in your change record so later upgrades can be compared against the plugin page. You know this step is done when the plugin appears under Installed plugins with the expected version number.

  4. Store the webhook URL as a Jenkins credential

    The Jenkins administrator adds the webhook URL as a secret text credential in the credentials store, scoped to the folder or system level that needs it, instead of pasting it into a job or a Jenkinsfile. Give the credential a clear ID so pipeline code can reference it without exposing the value. Jenkins masks secret text in build logs, which keeps the URL out of console output. You know this step is done when the credential is listed with its ID and its value is hidden on the credentials page.

  5. Configure the global Mattermost endpoint

    In the Jenkins system configuration, the administrator sets the Mattermost endpoint section with the webhook credential, the default channel, and the display name and icon that build messages will use. Keep the default channel consistent with the channel that owns the webhook, because a mismatch leads to messages that appear to be missing. Save the configuration and confirm the plugin's test or connection option, if your version offers one, reports success. You know this step is done when a test message from the global settings appears in the target channel.

  6. Add a post-build action or mattermostSend step

    For freestyle jobs, the job owner adds the Mattermost notification as a post-build action and selects the channel and the build states that should trigger a message. For Jenkins Pipeline, the engineer adds a mattermostSend step in a post block, referencing the stored credential ID and writing a message that includes the job name, build number and result. The plugin supports the mattermostSend step from version 2.0, so confirm the installed version supports it before writing pipeline code. You know this step is done when a dry run of the job or pipeline reaches the notification stage without a configuration error in the console log.

  7. Run a test build and check the channel

    The engineer runs a test build that is expected to succeed, and then, if practical, one that is expected to fail, to confirm both result types post correctly. Open the target channel and check that each message arrived once, shows the correct job name and build result, and links back to the build. If nothing appears, read the Jenkins console output for the notification step and check the webhook URL, the channel name and the network path from the controller to the Mattermost server. You know this step is done when both test results appear in the correct channel and the build log shows no notification errors.

Post-build actions or the mattermostSend step: which to use

Freestyle jobs use the post-build action that the Mattermost Notification plugin adds to the job configuration. After the build finishes, Jenkins posts a message to the Mattermost incoming webhook you configured, and the job's settings decide what the message contains and where it goes. This path needs no code in the repository, so it suits teams that still maintain older jobs or simple build-and-deploy tasks. The trade-off is that every job carries its own copy of the settings, so changes must be repeated job by job.

  • Per-job configuration: the webhook, channel and message text are set in each job's post-build section.
  • Build status detail: the message reflects the result of that job, so teams should confirm which build states the plugin reports for their configuration.
  • No pipeline dependency: the job does not need a Jenkinsfile or a Pipeline plugin to send the notification.
  • Manual drift risk: a fix to a shared message format must be applied to every freestyle job, which is easy to miss.
  • Plugin version check: confirm the installed plugin version and its Jenkins baseline before you rely on the post-build action.

Before you standardize on this path, list the freestyle jobs in scope and confirm that each one points at the intended channel and webhook.

Why you should check the plugin's age before relying on it

Check the plugin's version, its required Jenkins baseline and its release history before you put the Mattermost Notification plugin into a pipeline that matters. The plugin page lists version 3.1.3 and requires Jenkins 2.190.1 or later, so read those two numbers against your controller's current Jenkins version and the plugin's changelog. A plugin that has not moved for a long time may still run, but it was built against the Jenkins core and Mattermost behavior of its release date, and every later change in either is untested against it. Confirm the current release status on the plugin page, including the most recent release date and open issues, because that page is the only reliable source for whether the plugin is still maintained.

A stale plugin usually fails quietly rather than loudly. Jenkins core changes to the pipeline or credentials APIs can break the mattermostSend step after an upgrade, and Mattermost changes to incoming webhook payloads, channel permissions or the server's allowed hosts can cause posts to be rejected or dropped. Build notifications then stop arriving without any failed build to warn the team. Before each Jenkins core upgrade, run the step against a test channel on a non-production controller and confirm that a success and a failure both post, with the expected channel and attachment content. Keep the webhook URL in Jenkins credentials and not in the Jenkinsfile so that rotating it does not require a pipeline change.

Decide among three options and record the choice. Use the plugin when its maintenance status and Jenkins baseline match your controller and you accept its release pace. Pin a specific plugin version in your plugin management when you need a tested combination and will upgrade deliberately. Replace the plugin with a thin call from a pipeline step, such as an HTTP request to the incoming webhook with a JSON payload and the webhook URL held in a credential, when the plugin is unmaintained or lags your Jenkins version. The third option moves the logic into code you own, so you must test and maintain it, and it avoids a dependency on a plugin whose future is uncertain.

How a build result reaches a Mattermost channel

The flow starts when a Jenkins job finishes. Either the Mattermost Notification plugin's post-build action or a mattermostSend step in a Pipeline builds the message and sends it over HTTPS to an incoming webhook on your self-hosted Mattermost server, which posts it into the target channel. The boundary between the Jenkins network zone and the Mattermost network is where you check egress rules, TLS, and who can read the webhook URL.

Build results travel from Jenkins through an incoming webhook into one channel.

Which Jenkins build fields map to Mattermost message content

This table compares each Jenkins build detail with where it typically appears in a Mattermost message and how the team should expose it. Read it as a checklist: for each field, confirm with the installed plugin version whether it is available as a variable, a post-build option or a mattermostSend parameter before you design the message. Fields you cannot confirm should be built into the pipeline explicitly.

Build fieldWhere it usually appearsHow to obtain itWhat to confirm
Job nameMessage title or header lineJenkins job name from the build contextWhether the plugin text template exposes the job name or you must add it manually
Build numberMessage title, alongside the job nameJenkins build number for the runWhether the number is included by default or only in a custom message body
Build statusColor bar or status line in the messageResult of the build (success, unstable, failure)Which result values the plugin maps to message colors and which it sends as text
DurationFooter or detail lineElapsed time of the run as Jenkins records itWhether duration is exposed to the notification step or must be calculated in the pipeline
Build URLLink on the job or build nameAbsolute URL to the build page on your Jenkins serverThat the Jenkins root URL is set correctly, so links resolve for Mattermost users
Branch or commitDetail line or attachment fieldBranch name and commit identifier from the SCM contextWhether the plugin reads the branch or commit, or whether your pipeline passes them as parameters
Channel selectionDestination channel or incoming webhook targetChannel set on the webhook or the channel override on the post-build action or stepThat the channel override is allowed by the webhook configuration on your Mattermost server

Securing the webhook and Jenkins credentials

The Mattermost Notification plugin needs one secret to post: the incoming webhook URL. Anyone holding that URL can post into the target channel, so the controls below cover where the URL lives, which jobs and people can reach it, how the connection to Mattermost is verified, and when the URL must be replaced.

Treat the webhook URL as a secret

An incoming webhook URL carries its own authority. Anyone who copies it can post messages into the linked channel without signing in as a Mattermost user. Treat it like a password: do not paste it into tickets, chat threads, build logs or shared runbooks, and do not commit it to a repository. Ask your Mattermost administrator which channel each webhook targets, and record that mapping where your security team can review it.

Plugin page

Store the URL in Jenkins credentials

Keep the webhook URL in the Jenkins credentials store as a secret text credential, then reference it from the plugin configuration or pipeline by its credentials ID. Job configuration is readable by anyone with job read access and can appear in exported job XML, while the credentials store masks values in console output. Confirm that the credential is scoped to the folder or job that needs it instead of being defined globally.

Limit which jobs post to which channels

Use one webhook per channel or per team, not one webhook for everything. A build on a production release pipeline should not share a webhook with a sandbox job that runs experiments, because a misconfigured job could then reach the wrong audience. Map each folder or job to its approved webhook in writing, and review that map when a project is added, renamed or retired.

Restrict admin access to plugin configuration

Anyone who can change the global Mattermost Notification settings or edit a job's post-build action can redirect notifications or read configuration that refers to the webhook. Limit Jenkins administrator rights to a small group, use matrix or role-based authorization in Jenkins, and log changes to the plugin settings. Confirm with your Jenkins administrators which roles can view credentials, because read access to the store can expose the secret.

Verify TLS to the Mattermost server

The webhook request carries the secret in the URL, so it must travel over HTTPS to a certificate the Jenkins controller trusts. Use an https address, confirm that the certificate chains to your internal certificate authority where one is used, and do not disable certificate checks to make a connection work. If the Jenkins controller runs in a network segment that reaches Mattermost through a proxy, confirm that the proxy does not terminate and re-issue certificates in a way the controller does not trust.

Rotate the webhook when people or jobs change

Rotate the webhook whenever staff with access leave, a job owner changes, or a URL may have been exposed. Create a new incoming webhook in Mattermost, update the Jenkins credential, run a test build to confirm delivery, then disable the old webhook. Keep a dated record of each rotation so you can show when the previous URL stopped working. Ask your team to confirm how often rotation happens as part of their own policy.

Why Jenkins notifications fail to reach Mattermost

This table lists the failures most often seen when Jenkins posts build results to Mattermost through the Mattermost Notification plugin, with the cause and fix for each. Work down the rows in order when a build finishes without a message, since the first three causes are the cheapest to rule out. Check the plugin version and Jenkins baseline before changing the webhook or network.

FailureLikely causeFix
Plugin too old for the Jenkins baselineThe installed Mattermost Notification plugin is older than the Jenkins release it needs, so it fails to load or send after a Jenkins upgrade.Check the plugin page for the current version and its required Jenkins baseline, then upgrade Jenkins or pin a compatible plugin version.
Webhook URL wrong or revokedThe incoming webhook was copied incorrectly, belongs to another channel, or was deleted or regenerated in Mattermost.Recreate the incoming webhook in the target channel, update the URL in the Jenkins configuration, and send a test message from the job.
Channel missing or archivedThe channel named in the notification or webhook was archived, renamed or deleted, so posts have nowhere valid to land.Confirm the channel exists and is active, then point the webhook or job setting at the current channel name.
TLS trust failure to an internal CAThe Mattermost server uses a certificate issued by an internal certificate authority that the Jenkins controller or agent does not trust.Import the internal root or intermediate CA into the Java trust store used by Jenkins, then restart the controller and rerun the job.
Outbound firewall blocking JenkinsNetwork rules or a proxy stop the Jenkins controller from reaching the Mattermost server address and port on the webhook path.Test connectivity from the Jenkins host to the Mattermost URL, then open the required egress rule or configure the proxy settings Jenkins uses.
mattermostSend not available because the plugin is absent on the agentA pipeline calls mattermostSend, but the plugin is installed only on the controller or the agent runs a different Jenkins setup, so the step is undefined.Install the plugin where the pipeline runs, or confirm the controller-side configuration applies to every agent the pipeline uses.
Messages posted to an unexpected channel after a job copyA copied job keeps the channel or webhook setting from the original, so builds from the new job post into a shared team channel.Review each copied job's notification settings and pipeline script, then set the channel explicitly for every job that should post elsewhere.

Questions buyers ask about Jenkins and Mattermost notifications

What does it cost to post Jenkins build results to Mattermost?

The plugin and the Mattermost incoming webhook carry no published price in the sources we rely on, so the cost is the labor to set it up and keep it working. Effort rises with the number of jobs, how far pipelines are standardized, and how much security review the webhook and plugin need. Ask for a quote built from a written scope that lists the jobs in scope, the channels they post to, and whether the work covers review of the plugin version and Jenkins compatibility. Mattermost licensing is separate and depends on the plan you hold, so confirm that with Mattermost before you start.

How long does a basic Jenkins to Mattermost setup take?

Duration depends on your environment more than on the plugin itself. The main variables are how many Jenkins controllers and jobs need notifications, whether pipelines already share a common structure, how Mattermost channels and webhooks are approved, and how quickly your change process moves. A single job posting to one channel in a lab is a short task, while a standardized rollout across many teams takes longer. Ask any provider for a timeline tied to a written scope, and confirm the Jenkins and Mattermost change windows with your own teams first.

Can our own team set up Jenkins build notifications alone?

Yes, a team with Jenkins administration experience can install the plugin, create an incoming webhook, and add a post-build action or a mattermostSend step on a test job. The harder work is consistency: deciding which events post, which channel receives them, how webhook URLs are stored as credentials, and how the setup is repeated across pipelines. If your Jenkins administrators have not owned plugin upgrades before, or if no one has time to review changes, a partner can plan and document the pattern for you. DeployOpen offers that work as a fixed-scope engagement.

What do we need from our Jenkins and Mattermost administrators?

You need three roles at minimum. A Jenkins administrator installs the plugin, manages credentials, and edits the jobs or shared pipeline library. A Mattermost administrator enables incoming webhooks for your server and creates the webhook for the target team and channel. A channel owner decides what the channel should receive and who can change its notifications. Agree up front who approves webhook creation, where the webhook URL is kept, and who reviews the pipeline changes. Without these owners in place, notifications tend to stall at the approval step.

Is the Jenkins Mattermost Notification plugin maintained enough to rely on?

Check before you depend on it. The plugin page lists version 3.1.3, which requires Jenkins 2.190.1, and it supports Jenkins Pipeline through the mattermostSend step from version 2.0. Confirm the release date, open issues, and compatibility with your current Jenkins LTS on the plugin page, and compare them with your own upgrade policy. If the plugin is older than your Jenkins baseline or its activity does not match your risk appetite, plan a test upgrade or a different delivery method. Record the decision so the next reviewer can see why you chose it.

When should we use a custom webhook approach instead of the plugin?

Choose a custom webhook approach when the plugin does not match how you need to post, when your Jenkins version is outside the plugin's supported range, or when security review rejects a third-party plugin in the controller. A direct call from a pipeline to the Mattermost incoming webhook, using a stored credential and a small script, gives you full control over the message format and error handling. The trade-off is that you own the code, its tests, and its upgrades. Compare both options in a short design note before you choose one.

What security checks apply to webhook URLs and Jenkins credentials?

Treat each Mattermost incoming webhook URL as a secret. Store it in Jenkins credentials rather than in job configuration or a shared script, restrict who can read it, and rotate it when people leave the project. Limit the webhook to one channel, and confirm that the plugin does not echo the URL into build logs. Review the plugin's permissions in your Jenkins instance and record the result for your security team. These checks are part of the planned scope, so ask any provider to list them in writing.

How the integration is scoped and handed over

Agree the scope in writing before any work starts. The written scope should name each Jenkins job or folder that will post, the Mattermost channel each job posts to, the events that trigger a message (for example, failure only, or every completed build), and the message format for each. It should also name the Jenkins controller and the Mattermost server the work targets, and who on the client side approves the channel list and the incoming webhook owner. A fixed scope keeps the notification design from growing silently into a general chat-ops build, and it gives both teams a clear acceptance test.

The client should expect a handover package, not just a working job. That package normally includes the test results from sending sample notifications to each agreed channel, a configuration record listing the plugin version installed, the Jenkins baseline it was tested against, the webhook's owner and location (stored as a credential, not written into a Jenkinsfile), and the post-build actions or mattermostSend calls in each job. Ask for the record format before work starts, and confirm who keeps the webhook rotation procedure after handover. Check the plugin version against the Jenkins plugin page at handover, because the listed minimum Jenkins version is 2.190.1 for the current release.

A retainer is the usual way to cover change after handover. Ask the quote to state what it covers if the Mattermost Notification plugin is updated, if its page lists a newer minimum Jenkins version, or if the Jenkins controller itself is upgraded. Ask whether the retainer includes retesting the agreed notifications after each change, and whether a plugin that stops being maintained is replaced or only flagged. Those answers, not the initial build, usually determine the long-run cost of the integration.

How DeployOpen delivers Mattermost integrations

DeployOpen plans the Jenkins to Mattermost notification path around your own Jenkins controllers and self-hosted Mattermost server, so build results reach the right channels with credentials you control. The work runs in the order a security and platform team would review it: scope, build, hand over, then support.

How we scope

  • Inventory which Jenkins controllers, jobs and pipelines will post, and which Mattermost teams and channels receive each result.
  • Agree in writing which posting method applies: post-build actions, the mattermostSend pipeline step, or both.
  • Confirm the plugin version your Jenkins baseline supports and record the plugin's release age in the scope.
  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How we build

  • Create the incoming webhooks in Mattermost with channel and display-name settings agreed with your teams.
  • Store webhook URLs as Jenkins credentials and wire them into jobs without placing them in pipeline source.
  • Add a test pipeline that posts success, unstable and failed states to a non-production channel before rollout.
  • Test that messages contain no secrets, console excerpts or data your channel policy excludes.

How we hand over

  • Document each job's notification configuration, the webhook owner and the channel it posts to.
  • Provide a runbook for rotating webhook URLs and for disabling a notification path during an incident.
  • Record the plugin version, the Jenkins baseline and the upgrade checks needed before any plugin change.
  • Walk your Jenkins and Mattermost administrators through the setup and the handover documentation.

How we support

  • Offer ongoing support, plugin upgrades and continuous testing as a retainer for Jenkins and Mattermost changes.
  • Review the Jenkins plugin's maintenance status on a schedule and plan a replacement path if it stops receiving updates.
  • Retest notification paths after Jenkins or Mattermost upgrades so build alerts keep arriving in the right channels.
  • Confirm retainer scope, response expectations and reporting in writing before support begins.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.