Skip to content

Commit d550200

Browse files
authored
Merge pull request #157 from buildkite-plugins/SUP-5895-update-readme-plugins-in-steps
Update README to include using plugins within command steps
2 parents 354f5ec + 6e0c5e6 commit d550200

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,37 @@ The plugin validates all step configurations before uploading the pipeline. Inva
115115
- command: "deploy.sh"
116116
```
117117

118+
#### Plugins in Step Configurations
119+
120+
The plugin preserves `plugins:` blocks when specified in command step configurations. This allows you to use Buildkite plugins within your monorepo-watched steps.
121+
122+
**Example**
123+
124+
```yaml
125+
steps:
126+
- label: "Triggering pipelines"
127+
plugins:
128+
- monorepo-diff#v1.8.0:
129+
watch:
130+
- path: services/api/
131+
config:
132+
command: "npm test"
133+
plugins:
134+
- artifacts#v1.9.4:
135+
upload: "coverage/**/*"
136+
- docker-compose#v5.12.1:
137+
run: api
138+
- path: services/web/
139+
config:
140+
command: "yarn build"
141+
plugins:
142+
- docker#v5.13.0:
143+
image: "node:20"
144+
workdir: /app
145+
```
146+
147+
When changes are detected in the watched paths, the plugin generates steps that include the specified plugins. The `plugins:` blocks are preserved exactly as configured.
148+
118149
```yaml
119150
steps:
120151
- label: "Triggering pipelines"
@@ -132,7 +163,7 @@ steps:
132163
group: docker/**
133164
steps: # Required: groups must have either 'steps' or an action
134165
- plugins:
135-
- docker#latest:
166+
- docker#v5.13.0:
136167
build: service
137168
push: service
138169
- command: docker/run-e2e-tests.sh

0 commit comments

Comments
 (0)