Jenkins Redirector
A tiny Flask app to discover the latest job ID for a particular multibranch pipeline job on Jenkins and redirect to the Blue Ocean view of that job.
Configuration
Configuration is done via environment variables. The following are available:
# Jenkins server base URL
JENKINS_SERVER=https://your-jenkins-server-domain.com
# Repo URL. Used on the home page.
GITHUB_URL=https://github.com/you/your-fork-of-this-app/
# number of minutes to cache build IDs per job and branch
CACHE_MINUTES=30You can set those locally in a .env file or with actual environment variables.
Docker
Build your image:
$ docker build -t jenkins-redirector .Run the thing:
$ docker run -it -p 5000:5000 -e CACHE_MINUTES=1 jenkins-redirectorDeployment
Deploys well as-is to Dokku and Deis. Should work well on Heroku as well, but might require some tweaks.