buildkite / pipeline-schema

A JSON schema for Buildkite’s pipeline file format
MIT License
30 stars 34 forks source link

Allow environment variables as values for some properties #79

Open dansamsara opened 1 month ago

dansamsara commented 1 month ago

The pipeline upload command supports environment variable substitution using the syntax $VAR and ${VAR}. While the schema validation works fine for properties that are strings, it will fail for properties such as parallelism where the type is defined as an integer.

What do you think about expanding some properties like parallelism to allow for a string, in addition to an integer, as long as the string resembles an environment variable?

"oneOf": [
  { "type": "integer" },
  { "type": "string", "pattern": "^\\$[A-Z_]+$|^\\$\\{[A-Z_]+\\}$" }
],