EgillAntonsson / Jenkinsfile_Philips_Hue_Light_Notifier

See you build status change via Philips Hue light! Play with changing the color and other values in the Jenkinsfile to get your custom build groove going!
https://Egill.rocks
The Unlicense
0 stars 0 forks source link
hue-bridge jenkins-ci jenkins-pipeline jenkinsfile philips-hue-lights

Jenkinsfile Philips Hue Light Notifier

See you build status change via Philips Hue light!

On build start the light turns Purple and blinks (for max 15 seconds), and then on build result:

Play with changing the color and other values in the Jenkinsfile to get your custom build groove going!

What is needed

How it works

In the Jenkinsfile (declarative Pipeline syntax) I coded HTTP requests to a Hue light via Hue API on the build status changes mention above.

Here are the steps to get it working for you:

  1. Find your desired light ID and update the variable value in the Jenkinsfile. Light IDs start from 1 and are basically in the order of your added lights to your Hue Bridge.
  2. Find out your Hue Bridge IP address and create a username for it.
  3. On Jenkins, add two secret text credentials for the Hue Bridge IP address and the username. Then copy the associated credential IDs and paste them into the variable values in the Jenkinsfile. (NOTE: If you don't mind writing your IP address and username directly into the Jenkinsfile, you can skip 3. and remove the Credentials code and replace the $IP and $USER in the httpRequest url parameter in the Jenkinsfile.

Commit and push the changes to your VCS and build the Jenkins job for the code repo, and enjoy the light show!

License

This is the license for this code repo.

"Hue Personal Wireless Lighting" is a trademark owned by Koninklijke Philips Electronics N.V., see www.meethue.com for more information. I am in no way affiliated with the Philips organization.