Skip to content

Commit 3bfa5df

Browse files
authored
Merge pull request #193 from buildkite-plugins/toote_plugin_tester
Use Plugin Tester
2 parents 3793964 + 826ae5d commit 3bfa5df

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

.buildkite/pipeline.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
steps:
22
- label: ":bash: Plugin"
33
plugins:
4-
docker-compose#v4.9.0:
5-
run: plugin
4+
- plugin-tester#v1.0.0: ~
5+
66
- label: ":ruby: Ruby"
77
plugins:
8-
docker-compose#v4.9.0:
9-
run: ruby
8+
- docker-compose#v4.11.0:
9+
run: ruby
10+
1011
- label: "✨ Lint"
1112
plugins:
12-
plugin-linter#v3.0.0:
13-
id: junit-annotate
13+
- plugin-linter#v3.1.0:
14+
id: junit-annotate
15+
1416
- label: ":bash: Shellcheck"
1517
plugins:
16-
shellcheck#v1.3.0:
17-
files: hooks/*
18+
- shellcheck#v1.3.0:
19+
files: hooks/*

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,22 @@ Default: `ruby:3.1-alpine@sha256:a39e26d0598837f08c75a42c8b0886d9ed5cc862c4b5356
8484

8585
## Developing
8686

87-
To test the plugin hooks (in Bash) and the junit parser (in Ruby):
87+
To run testing, shellchecks and plugin linting use use `bk run` with the [Buildkite CLI](https://github.com/buildkite/cli).
8888

8989
```bash
90-
docker-compose run --rm plugin &&
91-
docker-compose run --rm ruby
90+
bk run
91+
```
92+
93+
Or if you want to run just the plugin tests, you can use the docker [Plugin Tester](https://github.com/buildkite-plugins/buildkite-plugin-tester):
94+
95+
```bash
96+
docker run --rm -ti -v "${PWD}":/plugin buildkite/plugin-tester:latest
9297
```
9398

94-
To test the Ruby parser locally:
99+
To test the Ruby code with `rake` in docker:
95100

96101
```bash
97-
cd ruby
98-
rake
102+
docker-compose run --rm ruby
99103
```
100104

101105
To test your plugin in your builds prior to opening a pull request, you can refer to your fork and SHA from a branch in your `pipeline.yml`.

docker-compose.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
version: '2'
22
services:
3-
plugin:
4-
image: buildkite/plugin-tester:v4.0.0
5-
volumes:
6-
- ".:/plugin"
7-
depends_on:
8-
- ruby
93
ruby:
104
image: ruby:3.1-alpine@sha256:a39e26d0598837f08c75a42c8b0886d9ed5cc862c4b535662922ee1d05272fca
115
command: rake

0 commit comments

Comments
 (0)