buildkite/lifx-buildkite-build-light-webtask

Name: lifx-buildkite-build-light-webtask

Owner: Buildkite

Description: An example Webtask webhook endpoint for creating a LIFX-powered build light with Buildkite

Created: 2015-08-18 12:33:47.0

Updated: 2017-04-13 15:35:10.0

Pushed: 2015-09-30 01:56:14.0

Homepage: https://buildkite.com/docs/webhooks

Size: 172

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

LIFX Buildkite Build Light (Webtask)

An example Webtask webhook endpoint for creating a LIFX powered Buildkite build light.

Create a webhook endpoint in one line using webtask-cli:

Screenshot of creating a webtask

Add a new webhook to your Buildkite organization with the webtask URL:

Screenshot of adding it to Buildite

:v::panda_face::v:

LIFX panda build light in action

Step by step
1. Install the webtask-cli
install -h webtask-cli
nit
2. Create the webtask
reate https://raw.githubusercontent.com/buildkite/lifx-buildkite-build-light-webtask/master/index.js \
secret LIFX_ACCESS_TOKEN="[TOKEN FROM LIFX]" \
param  LIFX_BULB_SELECTOR="all"

Copy the URL, and then start streaming your webtask?s logs:

ogs
3. Setup the webhook notification

Create a new webhook notification in Buildkite and paste in your webtask's URL: Organization Settings ? Notifications ? Webhooks ? Add

Make sure to enable all the build scopes, as well as the ping (so you can see a ping notification in your wt logs straight after saving your webhook).

All that's left is to trigger a build! :tada:

4. Debugging

You can use the request logs on the bottom of the Buildkite webhook settings page to see the request to and response from your webtask, and you can use wt logs to see the logs from your webtask container.

Personalising

One bulb per project? One bulb per build pipeline step? A LIFX chandelier that twinkles rainbows after each deploy? The possibilities are endless!

Check out api.developer.lifx.com to see what?s possible with the API, then fork this project, and get hacking.

License

See the LICENSE file for license rights and limitations (MIT).


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.