You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:warning: This plugin may accept configurations that are not valid pipeline steps, this is a known issue to keep its code simple and flexible.
75
+
#### Step Validation
76
+
77
+
The plugin validates all step configurations before uploading the pipeline. Invalid steps are automatically skipped with a warning logged to the build output.
78
+
79
+
**A valid step must have:**
80
+
- A `command` or `commands` field (for command steps), OR
81
+
- A `trigger` field (for trigger steps), OR
82
+
- A `group` field with either:
83
+
- An action (`command`, `commands`, or `trigger`) directly on the group, OR
84
+
- Valid nested `steps`
85
+
86
+
**Invalid configurations that will be skipped:**
87
+
88
+
```yaml
89
+
# ❌ Empty step - no action defined
90
+
- path: "app/"
91
+
config:
92
+
label: "Deploy app" # Only has a label, no command/trigger
93
+
94
+
# ❌ Empty group - no action and no nested steps
95
+
- path: "services/"
96
+
config:
97
+
group: "Deploy"
98
+
# Missing: steps array or action
99
+
```
100
+
101
+
**Valid configurations:**
102
+
103
+
```yaml
104
+
# ✅ Valid - has command
105
+
- path: "app/"
106
+
config:
107
+
label: "Deploy app"
108
+
command: "echo deploying"
109
+
110
+
# ✅ Valid - group with nested steps
111
+
- path: "services/"
112
+
config:
113
+
group: "Deploy"
114
+
steps:
115
+
- command: "deploy.sh"
116
+
```
117
+
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.
76
148
77
149
```yaml
78
150
steps:
@@ -89,9 +161,9 @@ steps:
89
161
- path: docker/
90
162
config:
91
163
group: docker/**
92
-
steps:
164
+
steps: # Required: groups must have either 'steps' or an action
93
165
- plugins:
94
-
- docker#latest:
166
+
- docker#v5.13.0:
95
167
build: service
96
168
push: service
97
169
- command: docker/run-e2e-tests.sh
@@ -388,6 +460,34 @@ steps:
388
460
389
461
The plugin automatically retries binary downloads up to 3 times with a 5-second delay between attempts. This handles transient network issues when downloading from GitHub.
390
462
463
+
### `verify_checksum` (optional)
464
+
465
+
Default: `false`
466
+
467
+
Enable SHA256 checksum verification for downloaded binaries to enhance security. When enabled, the plugin verifies checksums against those published in the GitHub release, providing protection against compromised artifacts, network attacks, and binary tampering.
468
+
469
+
Checksum verification is performed for:
470
+
- Newly downloaded binaries (fails and deletes binary on mismatch)
471
+
- Cached binaries before reuse (automatically re-downloads on mismatch)
472
+
- Pre-installed binaries when `download: false` (best-effort, non-blocking)
473
+
474
+
To enable checksum verification:
475
+
476
+
```yaml
477
+
steps:
478
+
- label: "Triggering pipelines"
479
+
plugins:
480
+
- monorepo-diff#v1.8.0:
481
+
verify_checksum: true # Recommended for enhanced security
482
+
diff: "git diff --name-only HEAD~1"
483
+
watch:
484
+
- path: "foo-service/"
485
+
config:
486
+
trigger: "deploy-foo-service"
487
+
```
488
+
489
+
If checksums are unavailable for a release or the SHA256 command is not found on the system, the plugin will warn but continue execution (graceful degradation).
490
+
391
491
### `hooks` (optional)
392
492
393
493
Currently supports a list of `commands` you wish to execute after the `watched` pipelines have been triggered
@@ -568,6 +668,41 @@ steps:
568
668
command: "echo deploy-bar"
569
669
```
570
670
671
+
## Troubleshooting
672
+
673
+
### "Skipping invalid step" warnings
674
+
675
+
If you see warnings like `Skipping invalid step: empty step configuration`, check that your step configuration includes:
676
+
677
+
1. For command steps: `command`or `commands` field
678
+
2. For trigger steps: `trigger`field
679
+
3. For group steps: `group`field with either `steps` array or an action
680
+
681
+
**Common issues:**
682
+
683
+
- Forgetting to add `command:` or `trigger:` inside the `config` block
684
+
- Creating empty groups without nested steps
685
+
- Using only metadata fields like `label`, `key`, or `env` without an action
0 commit comments