Skip to content

Commit 432ea73

Browse files
committed
Document options and usage of environment variables to pass things around
1 parent f2bb63c commit 432ea73

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

Diff for: README.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,39 @@ Further reading and tools:
1414
* [JSON Schema](http://json-schema.org)
1515
* [JSON Schema Lint](https://jsonschemalint.com/)
1616

17+
## Configuration
18+
19+
Options available on the executable as long-form switches (`--OPTION`) can also be passed through as environment variables with the `PLUGIN_` prefix (`PLUGIN_OPTION`).
20+
21+
### Required
22+
23+
#### `id` (string, `PLUGIN_ID`)
24+
25+
This is the id of the plugin to be validated. It is used to search for and validate examples.
26+
27+
#### `path` (string, `PLUGIN_PATH`)
28+
29+
Where the plugin to lint can be found.
30+
31+
### Optional
32+
33+
#### `readme` (string, `PLUGIN_README`)
34+
35+
The name of the file to validate examples on.
36+
37+
Default: `README.md`
38+
39+
#### `skip-invalid` (boolean, `PLUGIN_SKIP_INVALID`)
40+
41+
Invalid versions are normally reported as failures, turning on this option would change that behaviour.
42+
43+
Default: `false`
44+
1745
## Usage
1846

19-
You can use this tool via the [Linter Plugin](https://github.com/buildkite-plugins/plugin-linter-buildkite-plugin) or you can add it to your docker-compose.yml file and then use `docker-compose run --rm lint`:
47+
You should use this tool via the [Linter Plugin](https://github.com/buildkite-plugins/plugin-linter-buildkite-plugin) in your plugin's pipeline.
48+
49+
Alternatively, you can add it to your docker-compose.yml file and then use `docker-compose run --rm lint`:
2050

2151
```yml
2252
services:
@@ -35,7 +65,8 @@ docker run \
3565
--rm \
3666
-v "$(pwd):/plugin" \
3767
buildkite/plugin-linter \
38-
--id my-org/my-plugin
68+
--id my-org/my-plugin \
69+
--path README.md
3970
```
4071

4172
If your plugin examples use a full git URL, such as `ssh://[email protected]/my-org/example-buildkite-plugin`, then you should specify the full git URL in the `id` argument.

0 commit comments

Comments
 (0)