feat(container-assist): refactor multi-container workflows to YAML te…#2169
Open
Tatsinnit wants to merge 4 commits into
Open
feat(container-assist): refactor multi-container workflows to YAML te…#2169Tatsinnit wants to merge 4 commits into
Tatsinnit wants to merge 4 commits into
Conversation
…mplates with matrix build (Azure#2161, Azure#2162, Azure#2163) - Extract multi-container workflow generation into 4 YAML template files under resources/yaml/ (header, build-job, deploy-job, deploy-job-managed-ns) - Replace N per-service build jobs with a single matrix strategy build job - Add "Apply to all remaining services" QuickPick for shared manifest paths - Update and expand test suite with 3-service snapshot tests Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors Container Assist’s multi-container GitHub Actions workflow generation to use external YAML templates (instead of TypeScript template literals), consolidates builds into a single matrix build job, and adds a shared manifest selection shortcut during multi-container configuration collection.
Changes:
- Moved multi-container workflow rendering to
resources/yaml/workflow-multi-*.template.yamlfragments and added substitution logic inworkflowTemplate.ts. - Replaced per-service build jobs with a single
buildjob usingstrategy.matrix.include, while keeping per-service deploy jobs. - Added a “Apply to all remaining services” QuickPick to reuse a manifest path across services during multi-container config collection, plus expanded unit tests (including a 3-service structural test suite).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/commands/aksContainerAssist/workflowTemplate.ts | Loads new multi-container YAML template fragments, renders matrix include entries, and generates per-service deploy jobs via placeholder replacement. |
| src/commands/aksContainerAssist/workflowGenerator.ts | Adds shared-manifest QuickPick flow when manifests aren’t auto-detected for remaining services. |
| src/tests/suite/containerAssist/workflowTemplate.test.ts | Updates tests for matrix build + per-service deploy, and adds a 3-service structural test suite including shared-manifest assertions. |
| resources/yaml/workflow-multi-header.template.yaml | New multi-container workflow header fragment. |
| resources/yaml/workflow-multi-build-job.template.yaml | New matrix build-job fragment with MATRIX_INCLUDE placeholder. |
| resources/yaml/workflow-multi-deploy-job.template.yaml | New per-service deploy-job fragment (standard namespace). |
| resources/yaml/workflow-multi-deploy-job-managed-ns.template.yaml | New per-service deploy-job fragment (managed namespace). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Tatsat (Tats) Mishra 🐉 <tatsatmishra@gmail.com>
…fest logic - Trigger "Apply to all" QuickPick on first non-undefined manifest instead of hardcoding to idx === 0 - Preserve auto-detected manifests for services that have them; only apply shared path to services lacking auto-detected manifests - Update variable comment to reflect actual behavior Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
This was
linked to
issues
May 23, 2026
…template The workflow-multi-deploy-job-managed-ns.template.yaml was referenced in code and tested but never committed, causing test failures in CI. Signed-off-by: Tatsat Mishra <tamishra@microsoft.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.
Multi-Container Workflow: YAML Templates, Matrix Build & Shared Manifest
Resolves #2161, #2162, #2163
Gentle fyi @bosesuneha for testing this please.
Summary
Refactors multi-container GitHub Actions workflow generation to use external YAML template files, consolidates per-service build jobs into a single matrix strategy job, and adds a "shared manifest" UX shortcut.
Changes
#2161 — YAML Template Files
resources/yaml/:workflow-multi-header.template.yaml— top-level workflow structure (name, triggers, shared env,jobs:key)workflow-multi-build-job.template.yaml— single build job with matrix strategy placeholderworkflow-multi-deploy-job.template.yaml— per-service deploy job (standard namespace)workflow-multi-deploy-job-managed-ns.template.yaml— per-service deploy job (managed namespace)workflowTemplate.tsto load and substitute these files viagetWorkflowYaml()instead of generating YAML from TypeScript template literals#2162 — Matrix Build Strategy
build-<service>:jobs with a singlebuild:job usingstrategy.matrix.includeservice,docker_file,build_context, andimageneeds: [build]to depend on the unified build job#2163 — Shared Manifest UX
Testing