Skip to content

Refresh CI agent images and update auth methods for tests - #636

Open
DrewH-ms wants to merge 3 commits into
mainfrom
drew-ci-partial-upgrade
Open

Refresh CI agent images and update auth methods for tests#636
DrewH-ms wants to merge 3 commits into
mainfrom
drew-ci-partial-upgrade

Conversation

@DrewH-ms

@DrewH-ms DrewH-ms commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Why

The CI agent images (windows-2019, ubuntu-20.04) have been retired, so every run fails at agent allocation:

No image label found to route agent pool Azure Pipelines.

Azure.iotedgedev is a required check, so this blocks all merges.

What

Refreshes the images and fixes what breaks on the newer agents. No product code changes.

  • Imageswindows-2022, ubuntu-22.04. Linux 3.6 leg dropped (not available on 22.04; Windows still covers 3.6). Linux now runs even if Windows fails.
  • Test auth — adds optional Entra ID auth via an ARM service connection, instead of credentials in pipeline variables. Opt-in through IOTHUB_AUTH_TYPE=login; unset behaves exactly as today.
  • Test fixtures — .NET 8 / ltsc2022. dotnet/sdk:2.1 has no Windows image for the 2022 agent kernel, so builds fail with an OS mismatch.
  • Deps — declare jsonschema (imported by deploymentmanifest.py but never declared; unpinned because current releases need Python ≥ 3.10). Drop unused msrestazure and docker-compose.
  • Miscnanoserver from MCR; azure-pipelines.yml cleanup (unwired file, happy to drop it from this PR).

Validation

All 7 legs green against this exact tree.

Two notes:

  • The service connection wiring is exercised for the first time by this PR's own run — may need a one-time resource authorization, and the azureServiceConnection default may need to match this project's connection name.
  • Container scan and CFS0011 warnings are pre-existing and identical on main.

@DrewH-ms
DrewH-ms marked this pull request as ready for review August 7, 2026 16:04
@DrewH-ms
DrewH-ms requested a balanced review from Copilot August 7, 2026 16:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refreshes CI environments, introduces optional service-connection authentication for tests, and modernizes test fixtures and dependencies.

Changes:

  • Updates Azure Pipelines agents and authentication paths.
  • Migrates .NET test modules to .NET 8/Windows Server 2022.
  • Adjusts dependencies, test utilities, and packaging.

Reviewed changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vsts_ci/win32/continuous-build-win32.yml Adds service-connection test execution.
vsts_ci/linux/continuous-build-linux.yml Adds AAD execution and local registry startup.
vsts_ci/.vsts-ci.yml Updates agents and job orchestration.
tests/utility.py Adjusts registry initialization and error capture.
tests/conftest.py Rewrites IoT CLI authentication arguments.
tests/assets/test_solution_shared_lib/sample_module_2/sample_module_2.csproj Targets .NET 8.
tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.windows-amd64 Updates Windows .NET images.
tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64.debug Updates Linux debug images.
tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64 Updates Linux runtime images.
tests/assets/test_solution_shared_lib/modules/sample_module/sample_module.csproj Targets .NET 8.
tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.windows-amd64 Updates Windows .NET images.
tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.amd64.debug Updates Linux debug images.
tests/assets/test_solution_shared_lib/modules/sample_module/Dockerfile.amd64 Updates Linux runtime images.
setup.py Declares jsonschema.
requirements.txt Updates runtime dependencies.
requirements_dev.txt Removes unused Compose dependency.
docker/tool/windows/Dockerfile.base Moves Nano Server image to MCR.
azure-pipelines.yml Modernizes package installation and wheel builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/assets/test_solution_shared_lib/sample_module_2/Dockerfile.amd64.debug Outdated
Comment thread tests/assets/test_solution_shared_lib/modules/sample_module/sample_module.csproj Outdated
Comment thread tests/assets/test_solution_shared_lib/sample_module_2/sample_module_2.csproj Outdated
@DrewH-ms

DrewH-ms commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

Comment thread setup.py Outdated
Comment thread requirements.txt Outdated
Comment thread vsts_ci/win32/continuous-build-win32.yml Outdated
Comment thread tests/utility.py
@DrewH-ms

DrewH-ms commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

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.

3 participants