I'm no longer using this approach. Please use one of the other answers.
What I ended up doing, for our specific case: (the previous answers were great - thanks!)
Because our build server is not on the Internet, we have a script to publish the build status to the gh-pages branch on GitHub.
- Start of build stamps failing
- End of build stamps success
- Project runs after main project to publish results -> build-status, API docs, test reports and test coverage.
GitHub caches images, so we created a .htaccess file, that instructs a short cache timeout for the build-status image.
Put this in the directory with the build-status image:
ExpiresByType image/png "access plus 2 minutes"
Here's the build script. The target that publishes to gh-pages is '--publish.site.dry.run'
With less than 400 lines of configuration, we have:
- Compile checks
- Unit & integration tests
- Test Reports
- Code Coverage Reports
- API documentation
- Publishing to GitHub
. . and this script can be run in or outside of Jenkins, so that:
- Developers can run this script before commit, reducing the chance of a broken build that impacts others.
- A failure is easy to reproduce locally.
The Results:
Project main page has the build status, updated after each build, along with latest API documentation, test results and test coverage.