Server side events if build has been finished

95 views
Skip to first unread message

Ullrich Hafner

unread,
Mar 20, 2019, 5:38:56 PM3/20/19
to Jenkins Developers
Do we have a public API to receive server side events in the client (browser) when a build has been finished? The build history portlet on the job page seems to update automatically of the status of a build changes.

I also want to auto-update my JS charts on the job page if there are new builds available. Is this possible somehow already?

Gavin Mogan

unread,
Mar 20, 2019, 5:48:08 PM3/20/19
to jenkin...@googlegroups.com
For browser side, you can use https://github.com/jenkinsci/sse-gateway-plugin which can send events to the front end

For back end, I know there are listeners, but I havn't looked into them too much yet.

On Wed, Mar 20, 2019 at 2:38 PM Ullrich Hafner <ullrich...@gmail.com> wrote:
Do we have a public API to receive server side events in the client (browser) when a build has been finished? The build history portlet on the job page seems to update automatically of the status of a build changes.

I also want to auto-update my JS charts on the job page if there are new builds available. Is this possible somehow already?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/7BB7B1B3-12B4-4C99-8951-1C4A9B71684F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Jesse Glick

unread,
Mar 20, 2019, 9:11:49 PM3/20/19
to Jenkins Dev
On Wed, Mar 20, 2019 at 5:38 PM Ullrich Hafner <ullrich...@gmail.com> wrote:
> Do we have a public API to receive server side events in the client (browser)

Unfortunately we do not.

> The build history portlet on the job page seems to update automatically of the status of a build changes.

Yes, but just because it polls (reloads data from the server every few seconds).

Ullrich Hafner

unread,
Mar 21, 2019, 3:43:22 PM3/21/19
to Jenkins Developers
That looks exactly like what I need!

The only disadvantage is that it requires Node. I tried to include Node quite some time into the maven build chain for my "old school" plugin but had no success (after several hours of work). 
Is there another „old school“ Jenkins Plugin that already uses successfully Node modules?    

Gavin Mogan

unread,
Mar 21, 2019, 4:37:11 PM3/21/19
to jenkin...@googlegroups.com
I don't think you need node to run the plugin, but you might need javascript modules to do frontend work.

Blueocean, and i think a few others, are using frontend-maven-plugin to install node and trigger the js/css building (mostly using babel)


Baptiste Mathus

unread,
Mar 21, 2019, 5:04:00 PM3/21/19
to Jenkins Developers
Blue Ocean? :)

Ullrich Hafner

unread,
Mar 21, 2019, 5:09:19 PM3/21/19
to Jenkins Developers
Ok, thanks for the pointers. I’ll see if I get it running this time...

Reply all
Reply to author
Forward
0 new messages