Skip to content

feat(ir): add typed builder for AzureContainerApps@1 - #1200

Merged
jamesadevine merged 2 commits into
mainfrom
feat/ir-azure-container-apps-607e5a2ba8a6220b
Jun 26, 2026
Merged

feat(ir): add typed builder for AzureContainerApps@1#1200
jamesadevine merged 2 commits into
mainfrom
feat/ir-azure-container-apps-607e5a2ba8a6220b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed builder struct for AzureContainerApps@1 to the ado-aw IR.

Motivation

Previously, any code that needed to emit an Azure Container Apps deploy step had to hand-craft TaskStep::new(...) with raw string input keys. This PR introduces a typed builder struct (new(<required>) + typed optional setters + into_step()) so required 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_container_apps.rs: new AzureContainerApps builder struct, ContainerAppIngress enum, and a #[cfg(test)] mod tests with 6 tests covering required-only, deploy-existing-image, build-from-source, ingress enum variants, optional fields, and yaml-config-path patterns.
  • src/compile/ir/tasks/mod.rs: pub mod azure_container_apps; declaration (alphabetical order, between azure_cli and azure_key_vault).

ADO Task Reference

  • Task: AzureContainerApps@1
  • Docs: (https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-container-apps-v1)
  • Required inputs: azureSubscription (Azure RM service connection)
  • Optional inputs: workingDirectory, appSourcePath, acrName, acrUsername, acrPassword, dockerfilePath, imageToBuild, imageToDeploy, containerAppName, resourceGroup, containerAppEnvironment, runtimeStack, targetPort, location, environmentVariables, ingress (typed ContainerAppIngress enum), yamlConfigPath, disableTelemetry

Usage examples

Deploy an existing image:

use crate::compile::ir::tasks::azure_container_apps::AzureContainerApps;

Step::Task(
    AzureContainerApps::new("my-azure-sc")
        .image_to_deploy("myacr.azurecr.io/myapp:latest")
        .container_app_name("my-app")
        .resource_group("my-rg")
        .into_step(),
)

Build from source and deploy:

Step::Task(
    AzureContainerApps::new("my-azure-sc")
        .app_source_path("$(System.DefaultWorkingDirectory)")
        .acr_name("mytestacr")
        .ingress(ContainerAppIngress::External)
        .target_port("3000")
        .into_step(),
)

Validation

  • cargo build --all-targets
  • cargo test azure_container_apps — 6 tests, all pass
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created by the ado-task-ir-contributor workflow.

Generated by ADO Task IR Contributor · 693.8 AIC · ⌖ 45.2 AIC · ⊞ 38.7K ·

Introduces a typed builder struct for the AzureContainerApps@1 ADO task,
covering both build-from-source and deploy-existing-image usage patterns.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot mentioned this pull request Jun 25, 2026
@jamesadevine
jamesadevine marked this pull request as ready for review June 25, 2026 13:00
@jamesadevine
jamesadevine merged commit 4da4dff into main Jun 26, 2026
2 checks passed
@jamesadevine
jamesadevine deleted the feat/ir-azure-container-apps-607e5a2ba8a6220b branch June 26, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant