<p>I was trying to do something similar (embed build status icons into email notifications) but since our build system is not publicly accessible, I ended up posting the status icons to imgur and referencing those images by storing the URL in variables according to state.</p>

<p>Here are some snippets from my email template Groovyscript:</p>

<p><strong>Defining the URLs:</strong></p>

<pre><code>def images = [:]
images["SUCCESS"] = "http://i.imgur.com/uXlqCxW.gif"
images["PASSED"] = "http://i.imgur.com/uXlqCxW.gif"
images["UNSTABLE"] = "http://i.imgur.com/QkQbxR3.gif"
images["SKIPPED"] = "http://i.imgur.com/QkQbxR3.gif"
images["FAILURE"] = "http://i.imgur.com/LUveOg7.gif"
images["FAILED"] = "http://i.imgur.com/LUveOg7.gif"
images["ABORTED"] = "http://i.imgur.com/jSdrWWP.gif"
images["NOT_RUN"] = "http://i.imgur.com/jSdrWWP.gif"
</code></pre>

<p><strong>Using the URLs in the email:</strong></p>

<pre><code>&lt;img src="${images[build.result.toString()]}" /&gt;
</code></pre>

CC BY-SA 3.0
2017-03-22T14:15:41.097Z
2017-03-29T05:06:53.750Z
2017-03-29T05:06:53.750Z
lawnmowerlatte
<p>The "<a href="https://wiki.jenkins-ci.org/display/JENKINS/Embeddable+Build+Status+Plugin" rel="noreferrer">Embeddable Build Status Plugin</a>" will do exactly that.</p>

<p>Note: This requires your Jenkins server to be accessible from the internet if you're using GitHub because they cache all images in their CDN.</p>

CC BY-SA 3.0
2017-03-02T05:54:56.970Z
2017-03-18T13:17:21.967Z
2017-03-18T13:17:21.967Z
Travis Thompson
<p>I'm using <a href="https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin" rel="noreferrer">Promoted Builds Plugin</a> to assign certain icons to Jenkins jobs on certain conditions and I'd like to publish these promotion icons.</p>

<p>How can I generate external links to these icons per each job, so they're accessible externally?</p>

<p>—————</p>

<p>For example I'd like to create the table in <code>README.md</code> on GitHub like:</p>

<pre><code>Job 1 | ![](link_to_icon_of_job_1)
Job 2 | ![](link_to_icon_of_job_2)
Job 3 | ![](link_to_icon_of_job_3)
</code></pre>

<jenkins><jenkins-plugins>
How to publish Jenkins job icons externally?
kenorb
# How to publish Jenkins job icons externally?

(Asked by: username_0 on 2017-02-28)

I'm using Promoted Builds Plugin to assign certain icons to Jenkins jobs on certain conditions and I'd like to publish these promotion icons.
How can I generate external links to these icons per each job, so they're accessible externally?
—————
For example I'd like to create the table in README.md on GitHub like:
Job 1 | ![](link_to_icon_of_job_1)
Job 2 | ![](link_to_icon_of_job_2)
Job 3 | ![](link_to_icon_of_job_3)

**Tags:** jenkins, jenkins-plugins


---

## 2 answers

### Answer by username_2 on 2017-03-02. Score: 11 | Accepted answer

The "[Embeddable Build Status Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Embeddable+Build+Status+Plugin)" will do exactly that.

Note: This requires your Jenkins server to be accessible from the internet if you're using GitHub because they cache all images in their CDN.


---

### Answer by username_1 on 2017-03-22. Score: 4

I was trying to do something similar (embed build status icons into email notifications) but since our build system is not publicly accessible, I ended up posting the status icons to imgur and referencing those images by storing the URL in variables according to state.
Here are some snippets from my email template Groovyscript:
Defining the URLs:
def images = [:]
images["SUCCESS"] = "http://i.imgur.com/uXlqCxW.gif"
images["PASSED"] = "http://i.imgur.com/uXlqCxW.gif"
images["UNSTABLE"] = "http://i.imgur.com/QkQbxR3.gif"
images["SKIPPED"] = "http://i.imgur.com/QkQbxR3.gif"
images["FAILURE"] = "http://i.imgur.com/LUveOg7.gif"
images["FAILED"] = "http://i.imgur.com/LUveOg7.gif"
images["ABORTED"] = "http://i.imgur.com/jSdrWWP.gif"
images["NOT_RUN"] = "http://i.imgur.com/jSdrWWP.gif"

Using the URLs in the email:


---

