email - Jenkins Graphs in embedded in mail or as attachment -
is possible save “jenkins_url/job/job_name/buildtimegraph/png” and/or “jenkins_url/job/job_name/test/trend” graphs images after job build , them send them embedded or attachment using mail plugin.
like 1 shown below. http://s22.postimg.org/8619l7msx/jenkins_graph.jpg
i can suggest 1 unelegant way. following should done step step inside job:
- download graph png build workspace, i.e.
wget -o time_graph.png ${job_url}/buildtimegraph/png
in shell script build step. ${job_url} env var set jenkins. don't forget make job visible anonymous otherwise download wouldn't work without authorization. - archive downloaded png build's artifacts.
- set content type html email ext plugin postbuild step.
- place
<img src="${build_url}/artifact/time_graph.png" />
email template body. ${build_url} resolved email-ext plugin url current build. - done.
why need download , archiving not <img src="${project_url}/buildtimegraph/png" />
in email body?
because otherwise trend img shown in email reflect situation moment when dowloaded (cause it's generated on request) , not moment when email sent. if suits you, use second way simplier.
Comments
Post a Comment