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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
An example Webtask webhook endpoint for creating a LIFX powered Buildkite build light.
Create a webhook endpoint in one line using webtask-cli:
Add a new webhook to your Buildkite organization with the webtask URL:
:v::panda_face::v:
install -h webtask-cli
nit
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"
LIFX_ACCESS_TOKEN
is a LIFX API token you generate from https://cloud.lifx.com/settings.LIFX_BULB_SELECTOR
is LIFX API build selector to choose which bulbs to turn on (see LIFX developer docs for examples). The default is all
.WEBHOOK_TOKEN
is optional, and can be provided to verify the webhook came from Buildkite.Copy the URL, and then start streaming your webtask?s logs:
ogs
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:
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.
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.
See the LICENSE file for license rights and limitations (MIT).