DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
129 stars 55 forks source link

Env overrides should allow individual variable overrides #1475

Open dustinsmith1024 opened 1 month ago

dustinsmith1024 commented 1 month ago

Feature request description

Can we allow overriding just one environment variable?

I believe this used to work as my tests recently started failing. I tried switching to the new overrides syntax and got tripped up for awhile with support. Eventually I removed the variable and everything started working again.

https://github.com/DataDog/datadog-ci/blob/master/src/commands/synthetics/run-tests-command.ts#L330-L336

Solution

Have this not override all the other variables from the config file.

DATADOG_SYNTHETICS_OVERRIDE_VARIABLES='{\"ROUTER_URL\":\"router.app.com\"}' datadog-ci synthetics run-tests -s 'service:gateway-router' --failOnMissingTests --config ./synthetics/preview-config.json",

or maybe allow some ability to pass the env var in

DATADOG_SYNTHETICS_OVERRIDE_VARIABLES_ROUTER_URL="router.app.com" datadog-ci synthetics run-tests -s 'service:gateway-router' --failOnMissingTests --config ./synthetics/preview-config.json",

Additional context

No response

Command

synthetics