Currently plugins need to be applied to each step, which ends up being verbose and it's easy for them to get out of synch as changes are made.
I'm proposing a top level plugin
block that would allow plugins to be declared that would then apply to all steps.
This would aim to solve the current pain points:
- Version declarations need to be repeated
- Lots of copy/paste plugin blocks
- Easy to forget them on a new step
Functionally, they would act as though you copied the plugin stanza to each step, appended onto the end of whatever plugins were there. If a plugin of the same name is defined in the step, it's used to "extend" the top level definition, following the YAML extend semantics.
steps:
- command: ./run_build.sh
plugins:
lox/secrets#v1.0:
s3_bucket: my-buildkite-secrets
docker-compose#v1.2.1:
build:
- app
- test
config:
- docker-compose.yml
- docker-compose.test.yml
- command: ./run_tests.sh
plugins:
lox/secrets#v1.0:
s3_bucket: my-buildkite-secrets
docker-compose#v1.2.1:
run: app
config:
- docker-compose.yml
- docker-compose.test.yml
- command: ./publish.sh
plugins:
lox/secrets#v1.0:
s3_bucket: my-buildkite-secrets
docker-compose#v1.2.1:
run: app
config:
- docker-compose.yml
- docker-compose.test.yml
plugins:
lox/secrets#v1.0:
s3_bucket: my-buildkite-secrets
docker-compose#v1.2.1:
config:
- docker-compose.yml
- docker-compose.test.yml
steps:
- command: ./run_build.sh
plugins:
docker-compose:
build:
- app
- test
- command: ./run_tests.sh
plugins:
docker-compose:
run: app
- command: ./publish.sh
plugins:
docker-compose:
run: app