Skip to content

tendnz/honeymarker-buildkite-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Honeycomb Marker Buildkite Plugin

A Buildkite plugin to add a marker in Honeycomb when you do something in Buildkite

Based heavily on Git Commit.

Doesn't use Honeymarker - just uses the API (so nothing to install but JQ and CURL)

Example

steps:
  - command: make
    plugins:
      - tendnz/honeymarker#v1.0.5:
          message: "v1.0.0-prod" 
          writekey: ${HONEYCOMB_WRITE_KEY}
          dataset: test-dataset

With all options customized:

steps:
  - command: make
    plugins:
      - tendnz/honeymarker#v1.0.5:
          message: "v1.1.${BUILDKITE_BUILD_NUMBER}"
          writekey: ${HONEYCOMB_WRITE_KEY}
          dataset: "dataset-name-here"
          url: ${BUILDKITE_BUILD_URL}
          updatekey: "deploy-$ENV"

Configuration

  • message (required))

    The message for the marker.

  • writekey (required)

    Your honeycomb write key. Put the actual values in your secrets and use the ENV name.

      writekey: $YOUR_ENV_NAME
    

    DONT put it into the YML!

  • dataset (required)

    The name of the Honeycomb dataset to write to.

  • url (optional)

    The URL to attach to the marker

  • type (optional)

    The type. Freeform, but the same type will have the same color. Defaults to "deploy"

  • update (optional)

    Should we update? set to "true" if so (default to false) (has to have a false be run first!)

    Note that update uses a key from the previous "create", which is stored in a meta-data variable. If you want overlapping markers, include a update key

  • updatekey (optional, recommended)

    The key to use for overlapping markers. Means we can work out which marker to close when we update. The marker is stored based on the pipeline ID, eg honeymarker-GUID_ID-updatekey, so if you are marking 2 datasets, you want to use the updatekey which ties it to that dataset (eg if you have a dev and staging dataset).

    Usually just a bit of text, eg deploy-$environment

Tests / Linting

you can try it out with

WRITEKEY=xxxxxxxx DATASET=your-dataset-name MESSAGE="Hello World" tests/quicktest.sh

To run the tests of this plugin, run

docker-compose run --rm tests

To run the Buildkite Plugin Linter, run

docker-compose run --rm lint

License

MIT (see LICENSE)

About

🐝 Add a marker to your honeycomb dataset from Buildkite

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages