Get URL of Job in mail body in Jenkins

HobbitOfShire picture HobbitOfShire · Mar 14, 2014 · Viewed 25.8k times · Source

I have Job in Jenkins that sends an email after the build with a HTML report in its body using email-ext plugin by setting Default content to this :

${FILE,path="absolute_path/index.html"}

I want to add to this (my body mail ) the URL of the build of this job. How is that possible ?

Answer

HobbitOfShire picture HobbitOfShire · Mar 14, 2014

$BUILD_URL is the easiest way to do it, just add it in your Body mail and it will show the hyperlink of your latest build.