Windows Image Updater
Automates the end-to-end workflow for migrating Windows container images (e.g., LTSC2019 → LTSC2022) in OneBranch pipeline repositories. Handles package bumping, config regeneration, build validation, and PR creation.
Triggers
update windows image: start the full migration workflow
fix ltsc2019 warning: triggered by OneBranch EOL warning
migrate onebranch image: alternative phrasing
bump AdoPipelineGeneration: package-specific trigger
windows container image update for {repo}: repo-specific trigger
Quick Reference
| Input |
Output |
Duration |
| ADO repository (URL or local path) |
Draft PR with updated pipeline ymls, passing pipelines |
30-60 min |
Prerequisites
Required Knowledge
| Term |
Definition |
| OneBranch |
Microsoft's CI/CD build platform used for official builds and releases |
| ConfigGen |
Configuration Generation tool that produces pipeline YAML files from package definitions |
| Topology project |
A .NET project in resources repos that generates pipeline configs when run |
| LTSC |
Long-Term Servicing Channel, a Windows release model (e.g., LTSC2019, LTSC2022) |
| Buddy build |
Pre-merge validation pipeline that builds and tests changes before merge |
| Buddy release |
Pre-merge pipeline that validates the release process before merge |
| CPM |
Central Package Management, a NuGet feature where all versions are in Directory.Packages.props |
Required Tools
| Tool |
Purpose |
Verify |
| Git |
Version control |
git --version |
| .NET SDK |
Build and run .NET projects |
dotnet --version |
| ADO access |
Repository write access, PR creation rights |
az repos list |
Configuration
| Parameter |
Default |
Description |
| Old image pattern |
ltsc2019 |
Pattern to detect in pipeline yml files |
| Expected new image |
ltsc2022 |
Expected replacement (for verification) |
| Package name |
ConfigurationGeneration.AdoPipelineGeneration |
NuGet package to bump |
| Branch name |
feat/windows-image-update |
Feature branch name |
| Props file |
Directory.Packages.props |
Primary package props file (fallback: Packages.props) |
Process
Phase 1: Repository Setup
Purpose: Establish a clean working environment with baseline build metrics.
Clone or navigate to the repository
cd
dotnet test
Common first-error fixes:
After each single fix, rebuild. The error count should decrease significantly with each iteration.
Verification:
Phase 3: Config Generation & Verification
Purpose: Regenerate pipeline files and verify the Windows container image reference is updated.
Discover the ConfigGen/Topology project
Search for the project file:
# Look for .csproj files with Topology or ConfigurationGeneration in the name
Get-ChildItem -Recurse -Filter "*.csproj" | Where-Object { $_.Name -match "Topology|ConfigurationGeneration" }
Decision guide, how to identify repo type:
| Repo Type | How to Identify | Project to Run |
| Resources | Repo name contains .resources (e.g., MyService.resources) OR folder contains .resources in name | Topology project (e.g., *Topology*.csproj) |
| Combined | Single repo with a folder containing .resources in its name alongside service code | Run both if present; check which generates .pipelines/ output |
This regenerates pipeline configuration files. Expect many file changes.
Set-Location <path-to-csproj>\bin\Debug\net8.0
Check that pipeline yml files no longer reference the old image:
Get-ChildItem -Recurse -Path .pipelines -Filter "*.yaml" | Select-String "ltsc2019"
The `windowscontainerimage` value should now contain `ltsc2022` (or similar updated pattern).
Run final validation
Purpose: Create a draft PR, validate through pipelines, and attach results.
Stage and commit
git add -A
container image, resolving the LTSC2019 end-of-life warning."
```bash
git push -u origin feat/windows-image-update
## Summary
(end-of-life) to LTSC2022.
## Changes
- Resolved package dependency conflicts (if any)
## Validation
- [ ] Buddy build: [link]
Work Items
- AB#{work-item-id}
After the PR is created, the **pipeline-validator** skill takes over to:
alidate the PR description has required sections (Summary, Changes, Validation)
Discover and trigger all associated pipelines (PR Build → Buddy Build → Buddy Release)
Update the PR description with pipeline run links and results
6. Report final status
Anti-Patterns
|-------|-----|---------|
| Manually editing pipeline yml files | They are generated by ConfigGen; manual edits will be overwritten | Always use package bump → ConfigGen workflow |
| Creating non-draft PR | Premature review notifications before pipeline validation | Always create as draft first |
| Hardcoding ltsc2022 as the target | Next migration cycle will need different target | Use parameterized image names |
Verification
After complete execution:
Aborting / Rollback
|-----------|-----------------|
| Phase 1-2 (not pushed) | git checkout main && git branch -D feat/windows-image-update |
| Phase 4 (pushed, PR created) | Close the draft PR in ADO, delete the remote branch |
Extension Points
- Image name parameters: Change
--old-image for future LTSC migrations (e.g., ltsc2022 → ltsc2025)
- Package name: Update the target package if ConfigGen is renamed
- Pipeline types: Add new pipeline validation steps as OneBranch evolves
- Multi-repo batch: Extend to process multiple repositories in sequence
References
- Troubleshooting Guide: common errors and fixes during the update workflow
- Pipeline Validator Skill: automated pipeline discovery, triggering, and fix-retry loop (invoked in Phase 4)
1---2name: windows-image-updater3description: Automates Windows container image migration for OneBranch pipelines. Bumps AdoPipelineGeneration package, regenerates pipeline configs via ConfigGen, and verifies old image reference is removed. Use for LTSC2019 to LTSC2022 migration, container image updates, OneBranch pipeline image upgrades.4license: MIT5---67# Windows Image Updater89Automates the end-to-end workflow for migrating Windows container images (e.g., LTSC2019 → LTSC2022) in OneBranch pipeline repositories. Handles package bumping, config regeneration, build validation, and PR creation.1011---1213## Triggers1415- `update windows image`: start the full migration workflow16- `fix ltsc2019 warning`: triggered by OneBranch EOL warning17- `migrate onebranch image`: alternative phrasing18- `bump AdoPipelineGeneration`: package-specific trigger19- `windows container image update for {repo}`: repo-specific trigger2021## Quick Reference2223| Input | Output | Duration |24|-------|--------|----------|25| ADO repository (URL or local path) | Draft PR with updated pipeline ymls, passing pipelines | 30-60 min |2627---2829## Prerequisites3031### Required Knowledge3233| Term | Definition |34|------|------------|35| **OneBranch** | Microsoft's CI/CD build platform used for official builds and releases |36| **ConfigGen** | Configuration Generation tool that produces pipeline YAML files from package definitions |37| **Topology project** | A .NET project in resources repos that generates pipeline configs when run |38| **LTSC** | Long-Term Servicing Channel, a Windows release model (e.g., LTSC2019, LTSC2022) |39| **Buddy build** | Pre-merge validation pipeline that builds and tests changes before merge |40| **Buddy release** | Pre-merge pipeline that validates the release process before merge |41| **CPM** | Central Package Management, a NuGet feature where all versions are in Directory.Packages.props |4243### Required Tools4445| Tool | Purpose | Verify |46|------|---------|--------|47| **Git** | Version control | `git --version` |48| **.NET SDK** | Build and run .NET projects | `dotnet --version` |49| **ADO access** | Repository write access, PR creation rights | `az repos list` |5051---5253## Configuration5455| Parameter | Default | Description |56|-----------|---------|-------------|57| Old image pattern | `ltsc2019` | Pattern to detect in pipeline yml files |58| Expected new image | `ltsc2022` | Expected replacement (for verification) |59| Package name | `ConfigurationGeneration.AdoPipelineGeneration` | NuGet package to bump |60| Branch name | `feat/windows-image-update` | Feature branch name |61| Props file | `Directory.Packages.props` | Primary package props file (fallback: `Packages.props`) |6263---6465## Process6667### Phase 1: Repository Setup6869**Purpose:** Establish a clean working environment with baseline build metrics.70711. **Clone or navigate** to the repository7273 cd <repo-name>7475 ```76777879 dotnet test8081 ```8283 Common first-error fixes:8485 After each single fix, rebuild. The error count should decrease significantly with each iteration.8687**Verification:**8889- [ ] `dotnet build` exits with code 09091- [ ] No package downgrade warnings9293### Phase 3: Config Generation & Verification9495**Purpose:** Regenerate pipeline files and verify the Windows container image reference is updated.96971. **Discover the ConfigGen/Topology project**9899 Search for the project file:100101 ```powershell102 # Look for .csproj files with Topology or ConfigurationGeneration in the name103 Get-ChildItem -Recurse -Filter "*.csproj" | Where-Object { $_.Name -match "Topology|ConfigurationGeneration" }104105 ```106107 **Decision guide, how to identify repo type:**108109 | Repo Type | How to Identify | Project to Run |110 | **Resources** | Repo name contains `.resources` (e.g., `MyService.resources`) OR folder contains `.resources` in name | **Topology** project (e.g., `*Topology*.csproj`) |111 | **Combined** | Single repo with a folder containing `.resources` in its name alongside service code | Run both if present; check which generates `.pipelines/` output |112113 This regenerates pipeline configuration files. Expect many file changes.114115 ```powershell116 Set-Location <path-to-csproj>\bin\Debug\net8.0117118119 Check that pipeline yml files no longer reference the old image:120 Get-ChildItem -Recurse -Path .pipelines -Filter "*.yaml" | Select-String "ltsc2019"121122123124 The `windowscontainerimage` value should now contain `ltsc2022` (or similar updated pattern).1254. **Run final validation**126127- [ ] `dotnet test` exits with code 0128- [ ] No new warnings compared to baseline129130**Purpose:** Create a draft PR, validate through pipelines, and attach results.1311321. **Stage and commit**133134 ```bash135136 git add -A137 container image, resolving the LTSC2019 end-of-life warning."138 ```bash139140 git push -u origin feat/windows-image-update141 ## Summary142 (end-of-life) to LTSC2022.143144145 ## Changes146 - Resolved package dependency conflicts (if any)147148149 ## Validation150151152153154155156157158 - [ ] Buddy build: [link]159160161162163164165 Work Items166167 - AB#{work-item-id}168169170171172 After the PR is created, the **pipeline-validator** skill takes over to:173 alidate the PR description has required sections (Summary, Changes, Validation)174175176 Discover and trigger all associated pipelines (PR Build → Buddy Build → Buddy Release)177 Update the PR description with pipeline run links and results178179 6. Report final status180181182- [ ] Draft PR exists targeting default branch183184---185186## Anti-Patterns187188|-------|-----|---------|189190| Manually editing pipeline yml files | They are generated by ConfigGen; manual edits will be overwritten | Always use package bump → ConfigGen workflow |191| Creating non-draft PR | Premature review notifications before pipeline validation | Always create as draft first |192| Hardcoding ltsc2022 as the target | Next migration cycle will need different target | Use parameterized image names |193194## Verification195196After complete execution:197198- [ ] `dotnet test` succeeds199200- [ ] No `ltsc2019` references in `.pipelines/` yml/yaml files201- [ ] Draft PR created with description202- [ ] pipeline-validator completed, all pipelines pass (PR, buddy build, buddy release)203- [ ] PR description updated with pipeline run links204205---206207## Aborting / Rollback208209|-----------|-----------------|210| Phase 1-2 (not pushed) | `git checkout main && git branch -D feat/windows-image-update` |211| Phase 4 (pushed, PR created) | Close the draft PR in ADO, delete the remote branch |212213---214215## Extension Points2162171. **Image name parameters:** Change `--old-image` for future LTSC migrations (e.g., ltsc2022 → ltsc2025)2182. **Package name:** Update the target package if ConfigGen is renamed2193. **Pipeline types:** Add new pipeline validation steps as OneBranch evolves2204. **Multi-repo batch:** Extend to process multiple repositories in sequence221222## References223224- [Troubleshooting Guide](references/troubleshooting.md): common errors and fixes during the update workflow225- [Pipeline Validator Skill](../pipeline-validator/SKILL.md): automated pipeline discovery, triggering, and fix-retry loop (invoked in Phase 4)