A Buildkite plugin that lets you specify the Samson webhooks for your project that Buildkite can use to send data to Samson. This is an alternative to using Buildkite Notifications, which can only be configured by Administrators and hide webhook failures.
Store the token from your Samson project's webhook URL as a secret,
and expose it to the step as the SAMSON_WEBHOOK_TOKEN environment variable.
The token is the last part of the URL shown on the project's "Webhooks" tab:
https://samson.example.com/integrations/buildkite/<token>.
Treat it as a secret; anyone who has it can make Samson deploy.
steps:
- label: ":rocket: Deploy with Samson"
plugins:
- envato/samson-deploy#v0.2.0:
base_url: "https://samson.example.com"To deploy more than one Samson project from a pipeline,
store each token in its own environment variable and name it with token_env:
steps:
- label: ":rocket: Deploy the API with Samson"
plugins:
- envato/samson-deploy#v0.2.0:
base_url: "https://samson.example.com"
token_env: SAMSON_API_WEBHOOK_TOKENThe address of your Samson server, for example https://samson.example.com.
It must be https:// and a host name, with an optional port and no path.
The plugin sends the webhook to <base_url>/integrations/buildkite/<token>.
The name of the environment variable that holds the webhook token:
32 lowercase hex characters.
Defaults to SAMSON_WEBHOOK_TOKEN.
Choose a name ending in _TOKEN, so the Buildkite agent hides its value in build logs.
The full Samson webhook URL for your project. It must start with https:// and contain no spaces.
The URL contains the token, so don't commit it in plain text; use base_url instead.
The plugin prints a warning when url is set.
Set either url or base_url, not both, and don't set token_env with url.
urlmust start withhttps://and contain no spaces.- The plugin ignores
~/.curlrc. Set a proxy or CA certificate with environment variables instead, such asHTTPS_PROXYandCURL_CA_BUNDLE. - The undocumented
debugoption is removed.
To run the tests:
docker-compose run --rm testsTo run the Buildkite Plugin Linter:
docker-compose run --rm lint