1

In Jenkins classic interface it is possible to create a link in the output console, but I can't see how I can make something clicable in the Blue Green interface.

neves
  • 33,186
  • 27
  • 159
  • 192

2 Answers2

0

Well, it works almost out of the box. Blue Ocean automatically recognizes URL patterns and transform it in a clickable link. For example:

echo "CUCUMBER: ${BUILD_URL}cucumber-html-reports/overview-features.html"

Unfortunately it looks like it isn't possible to create a clickable arbitrary text.

neves
  • 33,186
  • 27
  • 159
  • 192
0

You can get the solution here :

How to display a hyperlink in hudson/jenkins build output console

You can also use a workaround for that which is fairly customisable than the method mentioned above.

After finishing your build you can add functionality to your build to send a mail with the report link.

You can do it through the Jenkinsfile or using the job configuration as well.

The Jenkinsfile groovy script is as follows.

        script {
                emailext subject: ' REPORT-Version/'+ "${G_BRANCH}" + ' $DEFAULT_SUBJECT' ,    

    body: "Click the link below to show Mocha Testing Results for your current build :<br><br><a href="+"${JENKINS_URL}"+"blue/organizations/jenkins/BAE_RELEASE_ACTIVITY/detail/BAE_RELEASE_ACTIVITY"+"/"+"${ENV_BUILD_NO}"+"/artifacts"+">BAE 4.5 Release Report</a>" ,
                    attachLog: true,
                    replyTo: '$DEFAULT_REPLYTO',
                    to: '$DEFAULT_RECIPIENTS' 
        }

Through Job configuration you can go to Job --> Configure --> Post Build Actions --> Editable Email Notifications.

Pranav Bhagwat
  • 287
  • 2
  • 11