Make url result of Hudson build

I have an assembly job that uploads results to a specific URL.

How do I place a link to this URL on the build page?

I tried to create a redirect HTML page and add it to the artifacts, but that seems a little strange.

+10
hudson jenkins
source share
2 answers

For completing the assignment? Or globally for all the work?

If your link is always static (example: only the latest artifacts), you can use the plugin for the sidebar. https://wiki.jenkins-ci.org/display/JENKINS/Sidebar-Link+Plugin , which will place a static link to the task (for all runs).

If your link has changed in a turn, here is what I do in my environment. I am updating the launch description with the <a href> tag. The link will not appear on the launch page, however, it works well in the build history.

enter image description here
Note above, [Debug] and [Release] are unique references for each specific assembly.

For this you need the Setter plugin. https://wiki.jenkins-ci.org/display/JENKINS/Description+Setter+Plugin . And in the plugin (this is a post-build action) just write pure HTML. You can use regular environment variables there

 <a href="http://whatever/${BUILD_NUMBER}">Link here</a> 

Edit: note that it is currently not so simple (if at all possible) to put html in the description of the assembly history. It works on a separate build page.

+16
source share

If you want markup to be treated as such, you must enable it: Jenkins Management> Global Security> Markup Format = HTML Safe

Then, for Jenkins script pipelines, you can simply set the currentBuild.description property with some HTML. Example:

 currentBuild.description = "Click <a href='http://yourlink'>here</a>" 

HTML rendering will appear in the build history and on the build page.

UPDATE: if you do not see “Safe HTML” in the “Markup markup format” drop-down list, you probably need to install the OWASP markup markup format plugin.

+4
source share

All Articles