Skip to content

Commit 945708b

Browse files
committed
Switch to id to match plugin-linter
1 parent 15d4957 commit 945708b

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ steps:
22
- label: ":sparkles: Lint"
33
plugins:
44
$BUILDKITE_REPO#$BUILDKITE_COMMIT:
5-
name: plugin-linter
5+
id: plugin-linter
66

77
- label: ":bash: Shellcheck"
88
plugins:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ steps:
1111
- label: ":sparkles: Lint"
1212
plugins:
1313
plugin-linter#v1.0.0:
14-
name: my-org/my-plugin
14+
id: my-org/my-plugin
1515
```
1616
1717
Note: this will pull the latest version of the Plugin Linter each time it is run.
@@ -20,9 +20,9 @@ If you want to run it locally on a command line, see the [Buildkite Plugin Linte
2020
2121
## Configuration
2222
23-
### `name`
23+
### `id`
2424

25-
The name of the plugin
25+
The id of the plugin (e.g. `my-org/my-plugin`)
2626

2727
### `readme` (optional)
2828

hooks/command

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ args=(
1212
"-it"
1313
"--rm"
1414
"--volume" "$PWD:/plugin:ro"
15-
"--env" "PLUGIN_NAME=$BUILDKITE_PLUGIN_PLUGIN_LINTER_NAME"
15+
"--env" "PLUGIN_ID=$BUILDKITE_PLUGIN_PLUGIN_LINTER_ID"
1616
)
1717

1818
if [[ -n "${BUILDKITE_PLUGIN_PLUGIN_LINTER_README:-}" ]] ; then

plugin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ requirements:
55
- docker
66
configuration:
77
properties:
8-
name:
8+
id:
99
type: string
1010
readme:
1111
type: string
1212
required:
13-
- name
13+
- id
1414
additionalProperties: false

tests/command.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ load '/usr/local/lib/bats/load.bash'
66
# export DOCKER_STUB_DEBUG=/dev/tty
77

88
@test "Runs the linter via Docker" {
9-
export BUILDKITE_PLUGIN_PLUGIN_LINTER_NAME=my-plugin
9+
export BUILDKITE_PLUGIN_PLUGIN_LINTER_ID=my-plugin
1010

1111
stub docker \
1212
"pull buildkite/plugin-linter : echo pulled image" \
13-
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_NAME=my-plugin buildkite/plugin-linter : echo linted"
13+
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin buildkite/plugin-linter : echo linted"
1414

1515
run $PWD/hooks/command
1616

@@ -21,12 +21,12 @@ load '/usr/local/lib/bats/load.bash'
2121
}
2222

2323
@test "Supports the readme option" {
24-
export BUILDKITE_PLUGIN_PLUGIN_LINTER_NAME=my-plugin
24+
export BUILDKITE_PLUGIN_PLUGIN_LINTER_ID=my-plugin
2525
export BUILDKITE_PLUGIN_PLUGIN_LINTER_README=some-readme.yml
2626

2727
stub docker \
2828
"pull buildkite/plugin-linter : echo pulled image" \
29-
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_NAME=my-plugin --env PLUGIN_README=some-readme.yml buildkite/plugin-linter : echo linted"
29+
"run -it --rm --volume /plugin:/plugin:ro --env PLUGIN_ID=my-plugin --env PLUGIN_README=some-readme.yml buildkite/plugin-linter : echo linted"
3030

3131
run $PWD/hooks/command
3232

0 commit comments

Comments
 (0)