emotional-jenkins-plugin

Jenkins Plugin GitHub release Jenkins Plugin Installs License

Jenkins logo

What it is

Mr. Jenkins has feelings too.

This plugin lets him show them: after every build, Mr. Jenkins appears in the side panel and reacts to the result. He is happy when the build succeeds, worried when it is unstable, angry when it fails, and disappointed when it is aborted.

Happy Mr. Jenkins Worried Mr. Jenkins Angry Mr. Jenkins Disappointed Mr. Jenkins

It works with Freestyle jobs and with Declarative and Scripted Pipelines.

Table of Contents

Download & Installation

Install the plugin from the Jenkins Plugin Manager (Manage Jenkins > Plugins > Available plugins, search for Emotional Jenkins), or download the latest .hpi and upload it via Manage Jenkins > Plugins > Advanced settings.

Usage

Freestyle jobs

  1. Open the job's configuration page.
  2. In Post-build Actions, click Add post-build action and select Emotional Jenkins.
  3. Save, then run a build. Mr. Jenkins appears in the side panel of the build page and the job page.

The Emotional Jenkins post-build action

Pipeline jobs

Add the emotionalJenkins() step to your Jenkinsfile. In a Declarative Pipeline, put it in post { always { ... } } so it runs whatever the outcome:

pipeline {
    agent any
    stages {
        stage('Build') {
            steps {
                sh './gradlew build'
            }
        }
        stage('Test') {
            steps {
                sh './gradlew test'
            }
        }
    }
    post {
        always {
            emotionalJenkins()
        }
    }
}

In a Scripted Pipeline, call it at the end, using try/finally so it also runs when the build fails:

node {
    try {
        stage('Build') {
            sh 'make'
        }
    } finally {
        emotionalJenkins()
    }
}

Good to know:

  • Mr. Jenkins shows the final result of the build, even though the step runs before the build has finished. A build that fails after the step was called still makes him angry.
  • The step does not need an agent or a workspace, so it also works with agent none.
  • On the job page, Mr. Jenkins shows the mood of the last completed build that used the plugin.

Moods

Build result Mood Mr. Jenkins
Success Happy Happy Mr. Jenkins
Unstable Worried Worried Mr. Jenkins
Failure Angry Angry Mr. Jenkins
Aborted / not built Disappointed Disappointed Mr. Jenkins

Screenshots

These screenshots come from Declarative Pipelines that use emotionalJenkins() in post { always { ... } }.

Success Unstable
Successful build: Mr. Jenkins is happy Unstable build: Mr. Jenkins is worried
Failure Aborted
Failed build: Mr. Jenkins is angry Aborted build: Mr. Jenkins is disappointed

Mr. Jenkins also appears on the job page, showing the mood of the latest build:

Job page of a failing pipeline with an angry Mr. Jenkins

Dark theme

The mood images have transparent backgrounds, so Mr. Jenkins also looks right with the Dark Theme:

Success Unstable
Successful build in the dark theme Unstable build in the dark theme
Failure Aborted
Failed build in the dark theme Aborted build in the dark theme

Requirements

  • Jenkins 2.580.2 or newer
  • Java 21 or newer

Release Notes

See GitHub Releases.

Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

To try your changes locally, run:

mvn hpi:run

and open http://localhost:8080/jenkins/. Run the full test suite with mvn clean verify.

Credits

Maintainers

This plugin is actively maintained. Co-contributors and feedback are welcome — please open an issue or pull request.

License

This project is licensed under the MIT License.


Jenkins community • Report a bug