Context
In #2145 the multi-container Container Assist workflow generator emits the GitHub Actions YAML by concatenating TypeScript template strings (renderBuildJob, renderDeployJob in src/commands/aksContainerAssist/workflowTemplate.ts). The single-container path uses placeholder substitution against resources/yaml/aks-deploy.template.yaml / aks-deploy-managed-ns.template.yaml.
Reviewer feedback (thread):
Can we use templates similar to single container workflow for the yaml code?
Why not in #2145
Multi-container emits a variable number of build-<svc> / deploy-<svc> job pairs (one per service), each with its own env: block and a conditional Annotate namespace step. That's awkward to express as a single static template with {{var}} substitution.
Proposal
Factor per-job fragments into reusable template files under resources/yaml/:
workflow-multi-header.template.yaml — top-level name, on, shared env, permissions.
workflow-multi-build-job.template.yaml — one build-<svc> job with per-service env.
workflow-multi-deploy-job.template.yaml — one deploy-<svc> job (with optional managed-namespace block, or two variants).
- Renderer concatenates header + N build fragments + N deploy fragments after substitution.
Acceptance criteria
Notes
- Single-container template substitution masks the YAML-indentation concern (block scalars are placed at a known column); the new templates need to declare the column where block scalars like
DEPLOYMENT_MANIFEST_PATH live so the path-formatter helper stays correct.
Follow-up to #2145.
Context
In #2145 the multi-container Container Assist workflow generator emits the GitHub Actions YAML by concatenating TypeScript template strings (
renderBuildJob,renderDeployJobinsrc/commands/aksContainerAssist/workflowTemplate.ts). The single-container path uses placeholder substitution againstresources/yaml/aks-deploy.template.yaml/aks-deploy-managed-ns.template.yaml.Reviewer feedback (thread):
Why not in #2145
Multi-container emits a variable number of
build-<svc>/deploy-<svc>job pairs (one per service), each with its ownenv:block and a conditionalAnnotate namespacestep. That's awkward to express as a single static template with{{var}}substitution.Proposal
Factor per-job fragments into reusable template files under
resources/yaml/:workflow-multi-header.template.yaml— top-levelname,on, sharedenv, permissions.workflow-multi-build-job.template.yaml— onebuild-<svc>job with per-service env.workflow-multi-deploy-job.template.yaml— onedeploy-<svc>job (with optional managed-namespace block, or two variants).Acceptance criteria
workflowTemplate.ts.js-yamlparse assertions added in Implements Azure/vscode-aks-tools project #994: #2145).Notes
DEPLOYMENT_MANIFEST_PATHlive so the path-formatter helper stays correct.Follow-up to #2145.