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-updater3version: 1.0.04description: 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.5license: MIT6metadata:7 source: https://skillmd.com/skills/rjmurillo/windows-image-updater8---910# Windows Image Updater1112Automates 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.1314---1516## Triggers1718- `update windows image`: start the full migration workflow19- `fix ltsc2019 warning`: triggered by OneBranch EOL warning20- `migrate onebranch image`: alternative phrasing21- `bump AdoPipelineGeneration`: package-specific trigger22- `windows container image update for {repo}`: repo-specific trigger2324## Quick Reference2526| Input | Output | Duration |27|-------|--------|----------|28| ADO repository (URL or local path) | Draft PR with updated pipeline ymls, passing pipelines | 30-60 min |2930---3132## Prerequisites3334### Required Knowledge3536| Term | Definition |37|------|------------|38| **OneBranch** | Microsoft's CI/CD build platform used for official builds and releases |39| **ConfigGen** | Configuration Generation tool that produces pipeline YAML files from package definitions |40| **Topology project** | A .NET project in resources repos that generates pipeline configs when run |41| **LTSC** | Long-Term Servicing Channel, a Windows release model (e.g., LTSC2019, LTSC2022) |42| **Buddy build** | Pre-merge validation pipeline that builds and tests changes before merge |43| **Buddy release** | Pre-merge pipeline that validates the release process before merge |44| **CPM** | Central Package Management, a NuGet feature where all versions are in Directory.Packages.props |4546### Required Tools4748| Tool | Purpose | Verify |49|------|---------|--------|50| **Git** | Version control | `git --version` |51| **.NET SDK** | Build and run .NET projects | `dotnet --version` |52| **ADO access** | Repository write access, PR creation rights | `az repos list` |5354---5556## Configuration5758| Parameter | Default | Description |59|-----------|---------|-------------|60| Old image pattern | `ltsc2019` | Pattern to detect in pipeline yml files |61| Expected new image | `ltsc2022` | Expected replacement (for verification) |62| Package name | `ConfigurationGeneration.AdoPipelineGeneration` | NuGet package to bump |63| Branch name | `feat/windows-image-update` | Feature branch name |64| Props file | `Directory.Packages.props` | Primary package props file (fallback: `Packages.props`) |6566---6768## Process6970### Phase 1: Repository Setup7172**Purpose:** Establish a clean working environment with baseline build metrics.73741. **Clone or navigate** to the repository7576 cd <repo-name>7778 ```79808182 dotnet test8384 ```8586 Common first-error fixes:8788 After each single fix, rebuild. The error count should decrease significantly with each iteration.8990**Verification:**9192- [ ] `dotnet build` exits with code 09394- [ ] No package downgrade warnings9596### Phase 3: Config Generation & Verification9798**Purpose:** Regenerate pipeline files and verify the Windows container image reference is updated.991001. **Discover the ConfigGen/Topology project**101102 Search for the project file:103104 ```powershell105 # Look for .csproj files with Topology or ConfigurationGeneration in the name106 Get-ChildItem -Recurse -Filter "*.csproj" | Where-Object { $_.Name -match "Topology|ConfigurationGeneration" }107108 ```109110 **Decision guide, how to identify repo type:**111112 | Repo Type | How to Identify | Project to Run |113 | **Resources** | Repo name contains `.resources` (e.g., `MyService.resources`) OR folder contains `.resources` in name | **Topology** project (e.g., `*Topology*.csproj`) |114 | **Combined** | Single repo with a folder containing `.resources` in its name alongside service code | Run both if present; check which generates `.pipelines/` output |115116 This regenerates pipeline configuration files. Expect many file changes.117118 ```powershell119 Set-Location <path-to-csproj>\bin\Debug\net8.0120121122 Check that pipeline yml files no longer reference the old image:123 Get-ChildItem -Recurse -Path .pipelines -Filter "*.yaml" | Select-String "ltsc2019"124125126127 The `windowscontainerimage` value should now contain `ltsc2022` (or similar updated pattern).1284. **Run final validation**129130- [ ] `dotnet test` exits with code 0131- [ ] No new warnings compared to baseline132133**Purpose:** Create a draft PR, validate through pipelines, and attach results.1341351. **Stage and commit**136137 ```bash138139 git add -A140 container image, resolving the LTSC2019 end-of-life warning."141 ```bash142143 git push -u origin feat/windows-image-update144 ## Summary145 (end-of-life) to LTSC2022.146147148 ## Changes149 - Resolved package dependency conflicts (if any)150151152 ## Validation153154155156157158159160161 - [ ] Buddy build: [link]162163164165166167168 Work Items169170 - AB#{work-item-id}171172173174175 After the PR is created, the **pipeline-validator** skill takes over to:176 alidate the PR description has required sections (Summary, Changes, Validation)177178179 Discover and trigger all associated pipelines (PR Build → Buddy Build → Buddy Release)180 Update the PR description with pipeline run links and results181182 6. Report final status183184185- [ ] Draft PR exists targeting default branch186187---188189## Anti-Patterns190191|-------|-----|---------|192193| Manually editing pipeline yml files | They are generated by ConfigGen; manual edits will be overwritten | Always use package bump → ConfigGen workflow |194| Creating non-draft PR | Premature review notifications before pipeline validation | Always create as draft first |195| Hardcoding ltsc2022 as the target | Next migration cycle will need different target | Use parameterized image names |196197## Verification198199After complete execution:200201- [ ] `dotnet test` succeeds202203- [ ] No `ltsc2019` references in `.pipelines/` yml/yaml files204- [ ] Draft PR created with description205- [ ] pipeline-validator completed, all pipelines pass (PR, buddy build, buddy release)206- [ ] PR description updated with pipeline run links207208---209210## Aborting / Rollback211212|-----------|-----------------|213| Phase 1-2 (not pushed) | `git checkout main && git branch -D feat/windows-image-update` |214| Phase 4 (pushed, PR created) | Close the draft PR in ADO, delete the remote branch |215216---217218## Extension Points2192201. **Image name parameters:** Change `--old-image` for future LTSC migrations (e.g., ltsc2022 → ltsc2025)2212. **Package name:** Update the target package if ConfigGen is renamed2223. **Pipeline types:** Add new pipeline validation steps as OneBranch evolves2234. **Multi-repo batch:** Extend to process multiple repositories in sequence224225## References226227- [Troubleshooting Guide](references/troubleshooting.md): common errors and fixes during the update workflow228- [Pipeline Validator Skill](../pipeline-validator/SKILL.md): automated pipeline discovery, triggering, and fix-retry loop (invoked in Phase 4)