Lightkeeper Bot
The Lightkeeper Bot is an extension wrapper for Lightkeeper.
By default, it provides a fire-and-forget mechanism to trigger a manual event in the application (if installed), without stalling the build.
This is helpful for custom build pipelines that perform many tasks, and creating the Pull Request URL is one of them. In that case, the app's default behavior of waiting until the overall build finishes would be unnecesary.
Customization
The hostname can be modifed through the LIGHTKEEPER_HOST
environment variable.
Additionally, a LIGHTKEEPER_API_KEY
is sent as an Authentication
header.
NOTE: Lightkeeper does not currently require an API key, but will be eventually enforced.
Usage
lightkeeperbot <baseUrl> [--pr=123] [--repo=owner/name] [--config-path=config/lightkeeper.(js|json)]
Option | Type | Description | Required | Default |
---|---|---|---|---|
pr | Number |
The Pull Request Number | ✅ | TRAVIS_PULL_REQUEST |
repo | String |
The repo's owner/name | ✅ | TRAVIS_PULL_REQUEST_SLUG |
config-path | String |
The configuration path | — | .github/lightkeeper.json |
Configuration File
See Lightkeeper's configuration.
Use the following values:
baseUrl | ci | type |
---|---|---|
{base_url} |
lightkeeperbot |
event |
Lightkeeper will replace {base_url}
with the provided <baseUrl>
.
NOTE: The configuration file can be either json
or js
.
Javascript Configuration:
- The default export can be an object or (async)function.
- If a function, the
baseUrl
option is passed as a parameter. - It needs to return a JSON-like object.
Using a Private Lighthouse Instance:
- Use a
js
config file, read API keys from environment - Pass a
headers
object insettings.lighthouse