How to point notification links to classic Jenkins path rather than to BlueOcean endpoint?

Article ID:360056522772
2 minute readKnowledge base

Issue

How to point notification links to classic Jenkins path rather than to BlueOcean endpoint?

Resolution

In this section we explain how to configure the notification links in GitHub or similar to point to classic Jenkins path rather than to BlueOcean endpoint.

Display URL for Blue Ocean

When enabling Blue Ocean plugin, the BlueOcean display URL plugin is usually installed. This plugin provides an implementation of the Display URL API plugin so that URLs used in GitHub pull requests, emails etc. point to BlueOcean endpoint rather than to classic Jenkins URLs.

The BlueOcean URL of a sample pipeline project testPipeline is:

https://server.example.com/m1/blue/organizations/jenkins/testPipeline/detail/testPipeline

while the classical Jenkins path of the same project is:

https://server.example.com/m1/job/testPipeline

Display URL API

Display URL API plugin provides an extension point to define alternate URLs for use in notifications. The preferred display URL provider may be changed back to classic Jenkins path with a Java system property

-Djenkins.displayurl.provider=org.jenkinsci.plugins.displayurlapi.ClassicDisplayURLProvider

or using the Jenkins Script Console (non-persistent change)

System.setProperty("jenkins.displayurl.provider", "org.jenkinsci.plugins.displayurlapi.ClassicDisplayURLProvider")

In addition, the global default can also be overridden with the environment variable: JENKINS_DISPLAYURL_PROVIDER.

Display URL API plugin allows the Jenkins user to select their preferred user interface when clicking links to Jenkins from notifications. Open User > Configure page to specify your preferred method:

user notification url