feat(ir): add typed builder for AzureWebApp@1 - #1179
Merged
Conversation
Add `azure_web_app` submodule with: - `AzureWebApp` builder struct (required: azureSubscription, appType, appName, package; optional: deployToSlotOrASE, resourceGroupName, slotName, customDeployFolder, runtimeStack, startUpCommand, customWebConfig, deploymentMethod) - `AppType` enum (WebApp | WebAppLinux) - `DeploymentMethod` enum (Auto | ZipDeploy | RunFromPackage) - 10 unit tests covering required inputs, optional inputs, slot deployment, Linux runtime stack, and all enum variants Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Adds a typed builder struct for
AzureWebApp@1to the ado-aw IR.Motivation
Previously, any code that needed to emit this ADO task step had to hand-craft
TaskStep::new(...)with raw string input keys. This PR introduces a typedbuilder struct (
new(<required>)+ typed optional setters +into_step()) sorequired inputs are positional, optional inputs and their constrained values are
type-checked, and call sites stop using stringly-typed keys.
Changes
src/compile/ir/tasks/azure_web_app.rs: newAzureWebAppbuilder structwith
AppTypeandDeploymentMethodtyped enums, plus 10#[cfg(test)] mod testsunit testssrc/compile/ir/tasks/mod.rs:pub mod azure_web_app;declaration(alphabetical order, after
azure_powershell)ADO Task Reference
AzureWebApp@1azureSubscription,appType,appName,packagedeployToSlotOrASE,resourceGroupName,slotName,customDeployFolder,runtimeStack(Linux),startUpCommand(Linux),customWebConfig(Windows),deploymentMethodAppType(WebApp|WebAppLinux),DeploymentMethod(
Auto|ZipDeploy|RunFromPackage)Validation
cargo build --all-targetscargo test(10 new tests pass; full suite green)cargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
spsprodeus21.vssps.visualstudio.comspsprodweu4.vssps.visualstudio.comSee Network Configuration for more information.