feat(run): add --env for inline environment overrides#498
Open
jongio wants to merge 1 commit into
Open
Conversation
Add a repeatable --env KEY=VALUE flag to azd app run that merges inline overrides into the resolved service environment. Inline values take precedence over --env-file and azure.yaml. Malformed entries return a clear error. Closes #493 Co-authored-by: Copilot App <[email protected]>
Contributor
|
🚀 Website Preview Your PR preview is ready! 📎 Preview URL: https://jongio.github.io/azd-app/pr/498/ This preview will be automatically cleaned up when the PR is closed. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
==========================================
+ Coverage 60.77% 60.79% +0.02%
==========================================
Files 223 223
Lines 28527 28538 +11
==========================================
+ Hits 17337 17351 +14
+ Misses 10010 10006 -4
- Partials 1180 1181 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Contributor
🚀 Test This PRA preview build ( 🌐 Website PreviewLive Preview: https://jongio.github.io/azd-app/pr/498/ One-Line Install (Recommended)PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.ps1) } -PrNumber 498 -Version 0.19.5-pr498"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.sh | bash -s 498 0.19.5-pr498UninstallWhen you're done testing: PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.ps1) } -PrNumber 498"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.sh | bash -s 498Build Info:
What to Test: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #493.
azd app runcan already load variables from a file with--env-file, but there was no way to set one inline. This adds a repeatable--env KEY=VALUEflag that merges into the resolved environment passed to each service, with inline values winning over--env-fileand azure.yaml.--env KEY=VALUEis repeatable in a single run.--env-fileand azure.yaml.=or with an empty key returns a clear error.=characters.Tests cover parsing, multi-value merge, precedence, and the error path. CLI reference updated.
Closes #493