A Build Status Light for Jenkins

Red, amber and green domes are stacked on the matte-black Status Light. Those lenses suit a Jenkins build vocabulary, but no controllable interface is confirmed in the catalogue, so the software reader and hardware adapter must be treated separately.

Why did build lights start with Jenkins culture?

Continuous integration moved build feedback away from one developer's terminal and into a shared system. A visible signal made a broken main branch hard to overlook. The useful part of that tradition is not novelty hardware; it is a small, agreed state model tied to one important build.

A desk implementation should stay narrow. Choose the job and branch that actually block work. Lighting the latest result from every Jenkins folder produces an ambiguous warning that nobody owns.

How do you read job status from the Jenkins API?

Jenkins documents a machine-consumable remote API beneath the api path of controllers, jobs and builds, with JSON among its supported formats. Query the selected job or its latest build and request only the fields required to identify the build, whether it is still running and its completed result.

Secured instances support scripted authentication, with API tokens preferred. Keep the token outside the script, use read-only access where possible and verify the controller's TLS identity. Inspect the api page on the actual server because plugins and installed versions affect available data.

How do you map building, passing and failing to colours?

Use amber while the chosen build explicitly reports that it is running. Set green only after a completed success and red after a completed failure. Aborted, unstable or not-built results need written policies instead of being squeezed into success by default.

Store the build identifier with the colour. A newly queued build should not inherit the previous green as though it had already passed, and an old red should not masquerade as a fresh failure after the reader restarts.

What does a flaky network do to the pattern?

A timeout or authentication error makes the state unknown. It does not make the build successful or failed. After a small number of restrained retries, show unknown on a companion display or turn the automated signal off, then record the last successful read time.

The Status Light provides an appropriate physical arrangement if its real unit can be controlled through a documented path. Verify that first. Test the poller with saved Jenkins responses and a deliberate network outage before connecting any desk hardware. Run the reader as an unprivileged account and prevent concurrent copies from fighting over state. Write updates atomically. After a restart, fetch the current build again instead of replaying the last colour without verification.

Back to blog