embeddable-build-status-plugin: Broken image in github

I have a simple build status link in my readme.md to our local Jenkins server. If I preview readme.md in a Markdown viewer in VS Code, it renders fine. I also have a link on a Confluence page, and that renders fine.

In GitHub however it fails to render, only showing a broken image.

The link is very simple, of this format…

[![Build Status](http://jenkins-server:8080/buildStatus/icon?job=our-project%2Fmaster)](http://jenkins-server:8080/blue/organizations/jenkins/our-project/activity?branch=master)

I have also tried with simple HTML ‘img’ tags, but doesn’t work.

If I put the image link direct into the browser it renders fine.

I should add that we’re using GitHub Enterprise, hosted on-premises but then it can see our Jenkins server, plus it works in our Confluence which is cloud hosted (i.e. the browser can see the Jenkins server so works fine).

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 10
  • Comments: 17 (1 by maintainers)

Most upvoted comments

It looks like this plugin outputs the build status as HTML and not an image. This explains why image markdown isn’t working.

Any chance this plugin can be updated to output an image resource?

@slw07g Thanks for pointing this out! I was pulling my hair for quite a while… This solved my problem too!

I was having issues as well, but with HTTPS, and had a ton of trouble trouble-shooting. Leaving this comment in case others searching for help encounter the same problem.

I use LetsEncrypt certs for my nginx reverse proxy, but I was not using the full chain certificate fullchain1.pem. So, once I updated my nginx reverse proxy configuration to use the fullchain cert instead of cert1.pem, it resolved the issue for me.

This implies that github camo proxy requires images hosted on HTTPS servers to have a fully valid CA chain.

@SangaviJayagopi : that really depends, I recommend you looking at Jenkins manual. But in my case it was nginx. For both there are good articles available in the internet.

@tjmoore - That is more or less what happened to me: the Jenkins certificate chain was not complete and GitHub was failing to load the image. Once I fixed the certificate in Jenkins then it started to work again.

I guess that GitHub uses something that requires the images referenced in Markdown to come from a valid HTTPS server. That would explain why works on Confluence, it worked manually in my browser, but not in GitHub until the certificate is fully setup.