Coder Social home page Coder Social logo

ggirou / yet-another-jenkins-notifier Goto Github PK

View Code? Open in Web Editor NEW
47.0 4.0 23.0 1002 KB

This extension monitors Jenkins jobs and notifies you of build results.

License: GNU Affero General Public License v3.0

HTML 39.97% JavaScript 51.16% CSS 3.46% Shell 1.64% Groovy 3.77%

yet-another-jenkins-notifier's Introduction

Jenkins Logo Yet Another Jenkins Notifier

This extension monitors Jenkins jobs and notifies you of build results with desktop notifications.

Features:
✔ Pop-up notifications
✔ Single job, view jobs or all jobs monitoring
✔ Folder and Pipeline support
✔ Multiple Jenkins servers support
✔ Number of failing, unstable or stable jobs in icon badge
✔ Choose to be notified on every build or on every unstable build

Installation

Add to Chrome Add to Firefox

Screenshots

Jobs list pop-up and desktop notification


View jobs monitoring


Configuration page

Author

This extension was created by Guillaume Girou (Google+, Twitter, GitHub).

Source

Source code available on GitHub.

Bug tracker

Found a bug? Please submit an issue on GitHub or even better, submit a pull request :)

Copyright and license

Copyright 2016 Yet Another Jenkins Notifier. Released under GNU General Public License v3.0.

yet-another-jenkins-notifier's People

Contributors

ggirou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

yet-another-jenkins-notifier's Issues

Enhancement: Filter job notifications

I have a Jenkins Job for processing DSL that runs regularly. But I dont care about notifications for that job. Add the ability to configure jobs to ignore.

Even better would be a way to configure notifications on a per job basis. As in I want notifications for all successes & filters for job A, but only want notification of failure for Job B.

Enhancement Suggestions

Thanks for the useful extension. I have few suggestion/queries:

  1. Is there a way to hide examples in the popup? Examples are great at the beginning, but later they are no more needed. By hiding examples, the popup would be very concise.
  2. Is it possible to reduce the height of urlForm? That would reduce distraction in the popup.
  3. I have too many jobs (10 jobs) in a single jenkins view. The status badge is little far away from the job names, which makes it difficult to quickly say which one is unstable unless I hover mouse to check which status is for which job. There are few options I can think of:
    Op1 -- Keep status badge in the left followed by job name. With the job names aligned in to column left. Align status badges just below the Mr Jenkins icon.
    (Success) MyJob1
    (Unstable) MyJob2
    Op2 -- Keep the current layout with each row having alternate/different coloring to quickly observe the row alignments.
    Just my thoughts, but you may have a better solution to this behavior.

Thanks Again,
Swarup

can't access dead object

Security wrapper denied access to property "then" on privileged Javascript object. Support for exposing privileged objects to untrusted content via exposedProps is being gradually removed - use WebIDL bindings or Components.utils.cloneInto instead. Note that only the first denied property access from a given global object will be reported. services.js:285:10

The build success notification has a confusing red background

The build result (success or failure) notifications use the standard Jenkins icon, that happens to have a red background (it's the butler on a red circle, see the first screenshot in the readme). When I glance at the notification, my first impression is often that the build has failed, even when it has not.

Suggestions : either use the Jenkins icon without the red circle, or use a green (or blue) background to indicate a build success.

Notification spam on connection loss/recover

When the internet connection is lost, I get a "Build is unreachable" notification for every single configured job, and when the connection is recovered, still a bunch of notifications for each job status.

Suggestion:

  • Only notify once instead of for each job on connection loss
  • Preferably make even that configurable: I actually only want the build failure notifications, I don't want to b spammed when on a shaky wifi.
  • Cache the build results somehow, to only notify about the changed jobs when recovering the connection.

url-encoded job name

When a job name contains url-encoded string the notification link should use the same encoded-string without decoding.

For instance this job link :

http://.../jenkins/job/bugfix%252F1000/

should not be transformed to :

http://.../jenkins/job/bugfix%2F1000/

Popup gets too big if you have a lot of jobs

It'd be as useful if the popup just showed summary (good/bad/disabled) and the jenkins link to click on. My popup goes back to the home position when I'm in the middle of scrolling it sufficient frequently to make it unusable.

This is for github type jenkins jobs where you have multiple pull requests / branches all being built.

How to fix "Error: unreachable" ?

Hello,

My job status are always "Error (unreachable)". How do I fix this please ? Can I have more details about the error ?

Thank you very much.

Enhancement: Filter jobs by result

Hi,

I do have a lot of jobs to monitor on multiple Jenkins servers. Therefore it is sometimes hard to
efficiently find failed jobs.
A solution to this could be a filter (configuration option) to only display jobs by their result, eg

|-------------------------

display job status
x
x
x
-------------------------

Best,
Christian

View/dashboard sharing

Hi @ggirou ,

Really nice tool !!

After creating a view for myself (which consists of jobs from multiple CI machines), how can I share it with my team so everyone can look at a single consolidated view?

Thanks.

Blue Ocean Link

It would be good if when clicking a job in the extension you could be redirected to the Blue Ocean screen rather than classic Jenkins. Maybe this could be enabled by a setting.

Support for Job Display Name

Currently only names are displayed. Could the popup/notifications use job display name and default to job name similar to how the web interface of Jenkins works.

Get rid of "Build not built" notification

I'm using a Multibranch Pipeline Job, that creates a new job automatically when it detects a new branch/PR in the Git repository.

When a new job is created, I get a "Build not built" notification for this job. I want to be notified only when the job has run (or failed, depending on the configuration).

Use Jenkins Server Sent Events

https://jenkins.io/blog/2016/05/26/introducing-blue-ocean/

https://github.com/jenkinsci/sse-gateway-plugin
https://github.com/jenkinsci/pubsub-light-module

https://github.com/jenkinsci/sse-gateway-plugin/blob/master/src/main/js/sse-client.js
https://github.com/jenkinsci/pubsub-light-module/blob/master/src/main/java/org/jenkins/pubsub/Events.java

var jenkinsUrl = "http://localhost:8080/";
var clientId = Math.random().toString(36).substring(7);
var listenUrl = jenkinsUrl + "sse-gateway/listen/" + clientId;
var EventSource = window.EventSource;
var source = new EventSource(listenUrl);
var jenkinsSessionInfo;
var configurationBatchId = 0;

source.addEventListener('open', function (e) {
  console.log('SSE channel "open" event.', e);
  if (e.data) {
    jenkinsSessionInfo = JSON.parse(e.data);
  }
}, false);
source.addEventListener('configure', function (e) {
  console.log('SSE channel "configure" ACK event (see batchId on event).', e);
}, false);
source.addEventListener('reload', function (e) {
  console.log('SSE channel "reload" event received. Reloading page now.', e);
}, false);

////////////// WAIT for open event

var channel = "job"; // ???
source.addEventListener(channel, function (e) {
  console.log('SSE channel "' + channel + '" event received.', e);
}, false);

configurationBatchId++;
var configureUrl = jenkinsUrl + 'sse-gateway/configure?batchId=' + configurationBatchId;
var config = {
  "jenkins_channel": channel
}
var configurationQueue = {
  "dispatcherId": jenkinsSessionInfo.dispatcherId,
  "subscribe": [config],
}
fetch(configureUrl,
{
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    },
    method: "POST",
    body: JSON.stringify(configurationQueue)
})
.then(function(res){ console.log(res) })
.catch(function(res){ console.log(res) })

please support jobnames for multibranch pipelines

hello,

in this case of 2 artifacts with multibranch pipelines the job names are equal to master.
http://localhost:8090/job/mypocketmod/job/master/
http://localhost:8090/job/mysuperfeature/job/master/
If i use many multibranch pipelines the jobs names are all unique :(

You can solve the problem by using the response json.fullDisplayName from the api url
http://localhost:8090/job/mypocketmod/job/master/lastBuild/api/json

Here a sample json response:

{  
   "_class":"org.jenkinsci.plugins.workflow.job.WorkflowRun",
   "actions":[  
      {  
         "_class":"hudson.model.CauseAction",
         "causes":[  
            {  
               "_class":"hudson.model.Cause$UpstreamCause",
               "shortDescription":"Gestartet durch vorgelagertes Projekt „NighlyTrigger“, Build 7",
               "upstreamBuild":7,
               "upstreamProject":"NighlyTrigger",
               "upstreamUrl":"job/NighlyTrigger/"
            }
         ]
      },
      {  

      },
      {  

      },
      {  

      },
      {  

      },
      {  

      },
      {  
         "_class":"org.jenkinsci.plugins.pipeline.modeldefinition.actions.RestartDeclarativePipelineAction"
      },
      {  

      },
      {  
         "_class":"org.jenkinsci.plugins.workflow.job.views.FlowGraphAction"
      },
      {  

      },
      {  

      },
      {  

      }
   ],
   "artifacts":[  

   ],
   "building":true,
   "description":null,
   "displayName":"#3",
   "duration":0,
   "estimatedDuration":11686,
   "executor":{  
      "_class":"hudson.model.OneOffExecutor"
   },
   "fullDisplayName":"mypocketmod » master #3",
   "id":"3",
   "keepLog":false,
   "number":3,
   "queueId":47,
   "result":null,
   "timestamp":1569762789037,
   "url":"http://stachel:8090/job/mypocketmod/job/master/3/",
   "changeSets":[  

   ],
   "culprits":[  

   ],
   "nextBuild":null,
   "previousBuild":{  
      "number":2,
      "url":"http://stachel:8090/job/mypocketmod/job/master/2/"
   }
}

Thanks

Question: Is it possible to restrict permissions so that it doesn't require access to all websites

Thanks for this. Looks like a great extension!
Even though its OSS, I still like to avoid extensions which require access to all sites.
I guess most of it probably boils down to the permission system design of chrome extensions.
But just wanted to check if its possible to have restricted access for this extension - since i am guessing its only displaying info in popup and not changing the open pages ?

Feature: Wildcard job checking

Hi there,

On my very large jenkins installation (>1000 jobs) I have several 'views' e.g. http://myjenkins/views/donutFactory - this will show me a list of all the donutFactory jobs. It would be great if I could just point the plugin at this view and then whenever that team adds a new job it will be automatically picked up!

Add date/time information on builds

Hello,

I just discovered your Firefox addon, and it's nice.
I miss date/time information on the window listing all last status jobs (when you click on the toolbar icon), do you think it could be added? (maybe as an option)

Thanks

Move "add url"-feature to the bottom

First things first: Great Plugin.
I recommend moving the "add url"-feature to the bottom or to the options. It uses almost 20% of the available space in the popup. Adding an url is not the main feature of the plugin. Showing the status of the jobs is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.