example plugin that goes through basic steps any buildkite plugin must through - lint, shellcheck, command hook test
steps:
- plugins:
- https://github.com/amasare/buildkite-plugin-hello-world#v1.0.0:
name: Ama
You'll need to run this pipeline on an agent that:
- can run
docker
commands - has
plugins-path
orBUILDKITE_PLUGINS_PATH
Make hooks/command executable
To run tests locally you will need to:
- install bats.
brew install bats-core
on MacOS. Other installation instructions here. - run tests with buildkites plugin tester which comes with supporting test libraries.
docker run it --rm -v "$(pwd):/plugin" buildkite/plugin-tester
.
Testing recommendations here