Skip to content
Web service to redirect to latest build for Jenkins multibranch pipeline job in Blue Ocean
Python HTML Dockerfile Shell
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates
.dockerignore
.gitignore
CODE_OF_CONDUCT.md
Dockerfile
LICENSE
README.md
app.py
requirements.txt
run.sh

README.md

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=30

You 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-redirector

Deployment

Deploys well as-is to Dokku and Deis. Should work well on Heroku as well, but might require some tweaks.

You can’t perform that action at this time.