Rewriting URLs for alternative UIs (e.g. Blue Ocean)

52 views
Skip to first unread message

James Dumay

unread,
Aug 25, 2016, 7:43:49 PM8/25/16
to Jenkins Developers, Daniel Beck
Hi all,

I've written a new API plugin called display-url-api that provides an extension point to rewrite alternate URLs for use in notifications. For example, if you installed Blue Ocean and wanted the mailer links to point to Blue Ocean URLs instead of Jenkins Classic, this would provide the mechanism for the Blue Ocean team to do so.


I've also spent some time filing PRs that make many Jenkins notification plugins use the API:
Originally this change was done in Jenkins core but it was recommended that it be pulled out into a separate plugin. However, Daniel Beck thought this would be a good candidate for including in core so that Blue Ocean could also override the URLs generated in the RSS feeds (currently part of core).

What would be the best approach here?


Jesse Glick

unread,
Aug 25, 2016, 9:49:39 PM8/25/16
to Jenkins Dev
On Thu, Aug 25, 2016 at 7:43 PM, James Dumay <jdu...@cloudbees.com> wrote:
> Daniel Beck thought this
> would be a good candidate for including in core so that Blue Ocean could
> also override the URLs generated in the RSS feeds (currently part of core).

We should just fix the latter:
https://issues.jenkins-ci.org/browse/JENKINS-26468

Oliver Gondža

unread,
Aug 26, 2016, 2:04:23 AM8/26/16
to jenkin...@googlegroups.com
I do not know much about blue ocean or other alternative UIs but should
it not be an attribute of user config what UI flavor user wants to use?
Putting the information into notification urls seems to not allow that.

--
oliver

James Dumay

unread,
Aug 26, 2016, 3:08:03 AM8/26/16
to Jenkins Developers
Sounds good to me - it can be extended to allow either a global or user preference pretty easily (PRs welcome!)

James Dumay

unread,
Aug 26, 2016, 3:09:29 AM8/26/16
to Jenkins Developers
Sounds like we can keep it as its own plugin.

Could someone approve the hosting ticket?

Oliver Gondža

unread,
Aug 26, 2016, 5:26:26 AM8/26/16
to jenkin...@googlegroups.com
On 2016-08-26 09:08, James Dumay wrote:
> Sounds good to me - it can be extended to allow either a global or user
> preference pretty easily (PRs welcome!)

Do I understand it correctly that we would _not_ need this URLs
rewriting then? Seems like a way to go to me in such a case ...

--
oliver

Daniel Beck

unread,
Aug 26, 2016, 8:08:26 AM8/26/16
to jenkin...@googlegroups.com

> On 26.08.2016, at 11:26, Oliver Gondža <ogo...@gmail.com> wrote:
>
> Do I understand it correctly that we would _not_ need this URLs rewriting then? Seems like a way to go to me in such a case ...

Not sure how this could be done. The idea IIUC is to have on option --

* Link to Blue Ocean
* Link to classic UI

and depending on its setting, things like emails, RSS, … would link to /job/foo or /blue/pipeline/foo (or whatever that URL is).

Globally, it would be set by the admin (for e.g. emails), but something like RSS could, if implemented on user level, link to the user's preference.

James Dumay

unread,
Aug 31, 2016, 11:50:46 PM8/31/16
to Jenkins Developers, m...@beckweb.net
FWIW, this plugin has now been approved and mailer has been the first plugin to accept changes.
Reply all
Reply to author
Forward
0 new messages