Skip to content

About

A Buildkite Plugin to send webhooks to Samson

Resources

Stars

0 stars

Watchers

56 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

Samson Deploy Buildkite Plugin

MIT License tests

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.

Example

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_TOKEN

Configuration

base_url

The 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>.

token_env (optional)

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.

url (deprecated)

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.

Upgrading from v0.1

  • url must start with https:// and contain no spaces.
  • The plugin ignores ~/.curlrc. Set a proxy or CA certificate with environment variables instead, such as HTTPS_PROXY and CURL_CA_BUNDLE.
  • The undocumented debug option is removed.

Development

To run the tests:

docker-compose run --rm tests

To run the Buildkite Plugin Linter:

docker-compose run --rm lint

About

A Buildkite Plugin to send webhooks to Samson

Resources

Stars

0 stars

Watchers

56 watching

Forks

Releases

Packages

Used by

Contributors

Languages