Reputation: 367
Using jenkins build description plug in I want to print a path of my network drive.
Below code is working fine.
stage('print') {
env.SMBuildDescription="Build path:"+"${buildpath}"
currentBuild.description=SMBuildDescription
}
But I want to add build path as a hyperlink.
Upvotes: 6
Views: 10535
Reputation: 6869
Try this:
stage('print') {
currentBuild.description = """Build path: <a href="${buildpath}">Link</a> """
}
This will only work if Markup Formatter
is set to Safe HTML
(rather than Plain text
) under /configureSecurity/ on your Jenkins instance.
Upvotes: 7