@@ -260,10 +260,89 @@ steps:
260260 build:
261261 message: "Deploying foo service"
262262 env:
263- - HELLO= 123
264- - AWS_REGION
263+ HELLO: 123
264+ AWS_REGION: ~ # Null literal reads from $ AWS_REGION
265265` ` `
266266
267+ # ## Environment Variables
268+
269+ Environment variables can be specified in two formats. Both formats are fully supported.
270+
271+ # ### Map Format (Recommended)
272+
273+ The map format provides clean, readable syntax :
274+
275+ ` ` ` yaml
276+ steps:
277+ - label: "Triggering pipelines"
278+ plugins:
279+ - monorepo-diff#v1.8.0:
280+ env:
281+ NODE_ENV: production
282+ API_URL: https://api.example.com
283+ PORT: 8080
284+ DEBUG: false
285+ AWS_REGION: ~ # Null literal reads from $AWS_REGION
286+ EMPTY_STRING: "" # Empty string sets to literal ""
287+ watch:
288+ - path: "services/"
289+ config:
290+ command: "npm test"
291+ env:
292+ TEST_ENV: integration
293+ MAX_WORKERS: 4
294+ ` ` `
295+
296+ Map format features :
297+ - Clean YAML syntax using key-value pairs
298+ - Supports non-string values (numbers, booleans) which are converted to strings automatically
299+ - Null values read from OS environment : use `KEY: ~` (recommended YAML null literal)
300+ - The explicit `~` ensures nothing is accidentally added during pipeline processing
301+ - Note : Unlike array format, you cannot use just `KEY` alone - you must use a null value
302+ - Empty string (`""`) is treated as a literal empty string value
303+ - Whitespace in values is preserved
304+ - Recommended for new configurations
305+
306+ # ### Array Format (Fully Supported)
307+
308+ The array format uses key=value syntax :
309+
310+ ` ` ` yaml
311+ steps:
312+ - label: "Triggering pipelines"
313+ plugins:
314+ - monorepo-diff#v1.8.0:
315+ env:
316+ - NODE_ENV=production
317+ - API_URL=https://api.example.com
318+ - AWS_REGION # Key-only reads from $AWS_REGION
319+ watch:
320+ - path: "services/"
321+ config:
322+ command: "npm test"
323+ env:
324+ - TEST_ENV=integration
325+ ` ` `
326+
327+ Array format features :
328+ - Key-only entries (e.g., `AWS_REGION`) read from OS environment variables
329+ - Supports values with equals signs : ` BUILD_ARGS=--arg1=val1`
330+ - Whitespace trimmed from keys and values automatically
331+ - Fully supported alongside map format
332+
333+ # ### Format Comparison
334+
335+ | Feature | Map Format | Array Format |
336+ |---------|-----------|--------------|
337+ | Syntax | `KEY : value` | `KEY=value` |
338+ | OS env reading | Null literal (`KEY : ~`) | Key-only entries (`KEY`) |
339+ | Empty string | `KEY : " " ` sets to ` " " ` | ` KEY=` sets to `""` |
340+ | Type support | Numbers, booleans | Strings only |
341+ | Whitespace | Preserved in values | Trimmed |
342+ | Readability | High | Medium |
343+
344+ **Note:** The format is determined by YAML structure - you cannot mix array and map syntax at the same level. However, you can use different formats at different levels (e.g., map format at plugin level, array format at step level).
345+
267346# ## `log_level` (optional)
268347
269348Add `log_level` property to set the log level. Supported log levels are `debug` and `info`. Defaults to `info`.
@@ -413,7 +492,7 @@ steps:
413492 diff: "git diff --name-only $(head -n 1 last_successful_build)"
414493 interpolation: false
415494 env:
416- - env1= env-1 # this will be appended to all env configuration
495+ env1: env-1 # this will be appended to all env configuration
417496 hooks:
418497 - command: "echo $(git rev-parse HEAD) > last_successful_build"
419498 watch:
@@ -444,7 +523,7 @@ steps:
444523 artifacts:
445524 - "logs/*"
446525 env:
447- - FOO= bar
526+ FOO: bar
448527
449528 wait: true
450529` ` `
0 commit comments