Skip to content

Add config file support to deployment gate command#2339

Merged
GabrielAnca merged 11 commits into
masterfrom
gabriel.anca/add-jit-gates-support
Jun 17, 2026
Merged

Add config file support to deployment gate command#2339
GabrielAnca merged 11 commits into
masterfrom
gabriel.anca/add-jit-gates-support

Conversation

@GabrielAnca

@GabrielAnca GabrielAnca commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

The deployment gate command only supports pre-created gates, where rules must be configured in Datadog ahead of time. This PR adds a --config-file option that accepts a path to a JSON file containing inline rule definitions, allowing gates to be evaluated without requiring any prior setup in Datadog.

Passing configuration via a JSON file is the standard pattern in this CLI for structured input (used by synthetics, SBOM, and others) — it avoids shell escaping of complex nested objects and keeps deployment config readable alongside the code.

When provided, the parsed configuration is included in the evaluation request. The command validates that the file exists, is valid JSON, and contains a non-empty rules array before proceeding.

@datadog-datadog-prod-us1-2

This comment has been minimized.

@GabrielAnca GabrielAnca added the software-delivery Related to [coverage, deployment, dora, junit, measure, tag, trace] label Jun 4, 2026
@GabrielAnca
GabrielAnca force-pushed the gabriel.anca/add-jit-gates-support branch from dc65ea3 to e004ad8 Compare June 4, 2026 10:33
@GabrielAnca GabrielAnca changed the title Add JIT gates support to deployment gate command Add config file support to deployment gate command Jun 4, 2026
@GabrielAnca
GabrielAnca requested a review from Aaron-9900 June 4, 2026 11:38
@GabrielAnca
GabrielAnca marked this pull request as ready for review June 4, 2026 11:39
@GabrielAnca
GabrielAnca requested review from a team as code owners June 4, 2026 11:39
Comment thread packages/plugin-deployment/src/__tests__/fixtures/config-valid.json Outdated
Comment thread packages/plugin-deployment/README.md Outdated
Comment thread packages/base/src/commands/deployment/gate.ts Outdated
Comment thread packages/base/src/commands/deployment/gate.ts Outdated
@GabrielAnca
GabrielAnca requested a review from Drarig29 June 4, 2026 14:44
@GabrielAnca
GabrielAnca force-pushed the gabriel.anca/add-jit-gates-support branch from e8f8931 to db92ebd Compare June 4, 2026 14:44
Comment thread packages/plugin-deployment/README.md Outdated
@GabrielAnca
GabrielAnca merged commit 7d47ede into master Jun 17, 2026
32 checks passed
@GabrielAnca
GabrielAnca deleted the gabriel.anca/add-jit-gates-support branch June 17, 2026 09:08
@GabrielAnca GabrielAnca mentioned this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

software-delivery Related to [coverage, deployment, dora, junit, measure, tag, trace]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants