All Projects → mattermost → mattermost-plugin-jenkins

mattermost / mattermost-plugin-jenkins

Licence: MIT License
A Mattermost plugin to interact with Jenkins

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to mattermost-plugin-jenkins

mattermost-plugin-welcomebot
No description or website provided.
Stars: ✭ 44 (+76%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-github
GitHub plugin for Mattermost
Stars: ✭ 112 (+348%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-voice
Mattermost plugin for voice messaging. 🎤 🔉
Stars: ✭ 64 (+156%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-starter-template
Build scripts and templates for writing Mattermost plugins.
Stars: ✭ 74 (+196%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-demo
A demo of what Mattermost plugins can do.
Stars: ✭ 52 (+108%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-antivirus
Antivirus plugin for scanning files uploaded to Mattermost
Stars: ✭ 30 (+20%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-todo
Mattermost plugin for tracking to do items
Stars: ✭ 45 (+80%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-skype4business
No description or website provided.
Stars: ✭ 15 (-40%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-google-calendar
Mattermost Google Calendar Plugin
Stars: ✭ 22 (-12%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-autotranslate
No description or website provided.
Stars: ✭ 34 (+36%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-walltime
Timezone Message Convert for Mattermost 🕛 🕒 🕕 🕘
Stars: ✭ 25 (+0%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-alertmanager
AlertManager Bot for Mattermost
Stars: ✭ 48 (+92%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-memes
Add culture to your Mattermost with memes 🔌
Stars: ✭ 59 (+136%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-apps
Powers the Mattermost App Framework
Stars: ✭ 29 (+16%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-zoom
Zoom plugin for Mattermost 🔌
Stars: ✭ 93 (+272%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-wrangler
Manage Mattermost Messages Masterfully!
Stars: ✭ 33 (+32%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-custom-attributes
Mattermost plugin for adding custom attributes to users!
Stars: ✭ 26 (+4%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-autolink
Automatically rewrite text matching a regular expression into a markdown link.
Stars: ✭ 100 (+300%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-rtl
Adds RTL support to Mattermost
Stars: ✭ 52 (+108%)
Mutual labels:  mattermost, mattermost-plugin
mattermost-plugin-agenda
Mattermost plugin to handle meeting agendas
Stars: ✭ 20 (-20%)
Mutual labels:  mattermost, mattermost-plugin

Mattermost Jenkins Plugin

Build Status Code Coverage

A Jenkins plugin to interact with jobs and builds, with slash commands in Mattermost.

Originally developed by Wasim Thabraze.

drawing

By extending Mattermost with the Jenkins integration, your team will enjoy:

  • Improved collaboration. Keep your team in sync with your latest build by automatically routing notifications to specific Mattermost Channels to display information about when builds start, whether they’re successful, or if exceptions occurred.
  • Increased productivity. Start Jenkins job builds and get logs and artifacts—all without leaving the Mattermost platform.
  • Centralized workflows. Consolidate builds into one channel to keep a timeline of key Jenkins builds in one place and avoid hunting across builds.

Integrating Mattermost with Jenkins lets you keep your whole DevOps team on top of recent builds and any failures that may occur. With the Mattermost Jenkins plugin, control over Jenkins functions is always at the fingertips of your entire DevOps team.

By using the Mattermost Jenkins integration, your team will spend less time switching over to Jenkins, logging in, and finishing builds.

Plugin for Jenkins Server

For a Jenkins integration that sends webhook notifications from Jenkins to Mattermost as post-build actions, see this repository: https://github.com/jenkinsci/mattermost-plugin This is useful for sending Jenkins notifications to specific channels. For example - whenever a new Release of your software is cut, it should notify the #Release channel in Mattermost. Using the Jenkins post-build action plugin lets you notify the right channels about success/failures.

Features

This plugin enables you to interact with jobs via slash commands in Mattermost. The supported slash commands are listed below:

Connect and disconnect with Jenkins server

  • Connect to Jenkins server - /jenkins connect username APIToken - Connect your Mattermost account to Jenkins.
  • Disconnect from Jenkins server - /jenkins disconnect - Disconnect your Mattermost account from Jenkins.

Interact with Jenkins jobs

  • Create a Jenkins job - /jenkins createjob - Create a Jenkins job using contents of config.xml. The slash command opens an interactive dialog for the user to input the job name and paste the contents of config.xml.

  • Trigger a Jenkins job - /jenkins build jobname - Trigger a build for the given job. If the job accepts parameters, an interactive dialog pops up for the user to input the required parameters.

    • If the job resides in a folder, specify the job as folder1/jobname. Note the slash character.
    • If the folder name or job name has spaces in it, wrap the jobname in double quotes as "job name with space" or "folder with space/jobname".
    • Follow similar pattern for all commands which takes jobname as input.
  • Abort a build - /jenkins abort jobname <build number> - Abort the given build of the specified job. If build number is not specified, the command aborts the last build of the job.

  • Enable a job - /jenkins enable jobname - Enable a given Jenkins job.

  • Disable a job - /jenkins disable jobname - Disable a given Jenkins job.

  • Delete a job - /jenkins delete jobname - Delete a given job.

  • Get artifacts - /jenkins get-artifacts jobname - Get artifacts of the last build of the given job.

  • Get test results - /jenkins test-results jobname - Get test results of the last build of the given job.

  • Get build log - /jenkins get-log jobname <build number> - Get log of a given build of the specified job as a file attachment to the channel. If build number is not specified, the command fetches the log of the last build of the job.

Interact with Plugins

  • List of installed plugins - /jenkins plugins - Get a list of installed plugins on Jenkins server along with the version of the plugin.

Adhoc commands

  • Safe restart Jenkins server - /jenkins safe-restart - Safe restart the Jenkins server.
  • Find connected Jenkins account - /jenkins me - Display the connected Jenkins account.
  • Get help - /jenkins help - Find help related to the syntax of the slash commands.

Installation

  1. Install the plugin
    1. Download the latest version of the plugin from the GitHub releases page
    2. In Mattermost, go to System Console -> Plugins -> Management
    3. Upload the plugin
  2. Enter Jenkins server URL
    1. Go to the System Console -> Plugins -> Jenkins
    2. Set the Jenkins server URL along with the protocol. Example: http://jenkins.example.com, https://jenkins.example.com
    3. Save the settings
  3. Generate an at rest encryption key
    1. Go to the System Console -> Plugins -> Jenkins and click "Regenerate" under "At Rest Encryption Key"
    2. Save the settings
  4. Enable the plugin
    1. Go to System Console -> Plugins -> Management and click "Enable" underneath the Jenkins plugin
  5. Test it out
    1. In Mattermost, run the slash command /jenkins connect <Jenkins Username> <Jenkins API Token>

Development

make

This will produce a single plugin file (with support for multiple architectures) that can be uploaded to your Mattermost server:

dist/jenkins-0.0.x.tar.gz

After the plugin is built, deploy it using Mattermost system console and test it out.

FAQ

How do I generate API Token for a given Jenkins user?

Since Jenkins 2.129 the API token configuration has changed:

You can now have multiple tokens and name them. They can be revoked individually.

  1. Log in to Jenkins.
  2. Click you name (upper-right corner).
  3. Click Configure (left-side menu).
  4. Use "Add new Token" button to generate a new one then name it.
  5. You must copy the token when you generate it as you cannot view the token afterwards.
  6. Revoke old tokens when no longer needed.

Before Jenkins 2.129: Show the API token as follows:

  1. Log in to Jenkins.
  2. Click your name (upper-right corner).
  3. Click Configure (left-side menu).
  4. Click Show API Token.

Source : https://stackoverflow.com/a/45466184/6852930

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].