Skip to content

{DevOps} Separate signed Docker preparation from publishing - #1491

Open
Naga Nandyala (naga-nandyala) wants to merge 3 commits into
mainfrom
refactor/signed-docker-validation
Open

Naga Nandyala (naga-nandyala) wants to merge 3 commits into
mainfrom
refactor/signed-docker-validation

Conversation

@naga-nandyala

@naga-nandyala Naga Nandyala (naga-nandyala) commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Related command

Not applicable; internal Azure DevOps pipeline orchestration.

Description

Separate signed PowerShell Docker image preparation from registry publication so beta signing and stable release exercise the same pre-publication Docker path.

Why

Previously, publish-docker-to-acr.yml combined two responsibilities:

  1. Building and smoke-testing AMD64/ARM64 PowerShell images from signed packages.
  2. Publishing images to ACR and verifying their delivery through ACR/MCR.

Stable release invoked this template, but beta signing intentionally did not publish and therefore skipped the signed PowerShell image build and validation too. As a result, this pre-publication work was only exercised by stable/stable-test, rather than by beta signing.

Daily coverage instead of release-day discovery

Beta signing already runs every day, selecting the latest successful beta build on main (the beta build itself is triggered by batched CI on main, not a daily schedule). By including the same signed PowerShell Docker preparation module in that daily signing run, both AMD64 and ARM64 image builds and native smoke tests are exercised every day, even when there are no new source changes.

This provides earlier detection of signed-package integration problems, base-image or dependency changes, and image build/runtime failures, instead of first discovering them during a stable release. It does not guarantee every release issue will be caught: registry publication and ACR/MCR delivery checks remain exclusive to stable/stable-test.

Separation of concerns

Phase Responsibility after this change
Build Produce and validate unsigned packages and CLI/PowerShell Docker images; existing alpha/beta build behavior is unchanged
Signed-artifact preparation Sign and validate packages through the existing templates, then use one shared Docker module to build and validate images that consume signed PowerShell packages
Publish Consume validated image artifacts, publish immutable tags to ACR, and verify delivery through ACR/MCR

build-signed-docker.yml is the single logical module for Docker preparation from signed artifacts. It currently handles PowerShell images and owns both image build and native smoke-validation stages, including their artifact hand-off, shared by beta signing, stable release, and stable-release-test. The module name leaves room for other signed-artifact image families without introducing speculative configuration; the existing PowerShell-specific stage names remain accurate and unchanged.

Verified signed distribution
  -> Build signed PowerShell Docker images (AMD64 + ARM64)
  -> Validate signed PowerShell Docker images (native agents)
       -> Beta signing stops here: no registry publication
       -> Stable / stable-test publish and verify through ACR/MCR

Implementation details

  • Extract the existing signed PowerShell Docker build/validation stages out of publish-docker-to-acr.yml, preserving their stage IDs, image artifact names, native architecture matrices, and smoke-test scripts.
  • Add the shared module to beta signing; stable and stable-test invoke it explicitly before their publishing template.
  • Recover the existing distribution version from the single verified azps-cmdlets-<version>.tar.gz, rather than depending on Init, which does not exist in beta signing. No new version is computed from the signing run or source.
  • Carry that image version in artifact-version.txt; retain the separate powershell-version.txt for checking the packaged Az module version.
  • Keep ACR publication gated on signed PowerShell image validation and existing CLI Docker validation. Registry publication jobs, immutable-tag behavior, ACR verification, MCR delay, and MCR verification remain unchanged.
  • Beta signing gains no registry publishing service connection or publishing variable group.

Scope

This is Docker-only. It does not combine or change the other signing, signed-distribution verification, native lifecycle validation, Component Governance, or GitHub publication stages. The shared module groups signed PowerShell Docker preparation, not every signed package into a new physical artifact or an umbrella signing template.

Stable-release-test retains its existing verification-only native flow; no full native signed lifecycle stage is added there.

Testing Guide

  • Passed all 15 retained pipeline-input safety tests:
    PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s devops/scripts/ci -p test_pipeline_input_safety.py -v
  • Parsed all 50 pipeline YAML files successfully with PyYAML.
  • Checked template parameter contracts and dependency wiring; confirmed non-Docker entry stages and registry publication job bodies remain unchanged.
  • Checked extracted Docker Bash syntax and git diff --check.
  • Updated the existing beta signed-artifact wiring assertion for the additional Docker consumer. No standalone Docker test file or new test pipeline step is included.
  • Live Azure DevOps runs, real Docker builds, signing, and registry publication have not been executed. Beta signing and stable-test runs remain the integration validation for this refactor.

  • The PR title starts with {DevOps} for an internal release-process change
  • Updated the existing test affected by the new signed-artifact consumer
  • Updated scoped pipeline documentation

Share signed PowerShell Docker build and validation across beta signing and stable release while keeping registry publication separate.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 23:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The release-path refactor still needs live beta-sign and stable-release-test validation of Azure DevOps template expansion, signed-artifact hand-off, native AMD64/ARM64 Docker execution, and publication gates.

No open issues 🎉

What changed in this PR

Separates signed PowerShell Docker preparation from registry publication in the AzCLIPS release pipelines. Beta signing now exercises the same build and smoke-validation path as stable releases without publishing images.

Changes:

  • Extracts shared AMD64/ARM64 image build and native validation stages for beta signing, stable release, and stable-release-test.
  • Derives image versions from verified signed archives and carries them in artifact-version.txt, separate from the Az module version.
  • Keeps publication gated on image validation and updates pipeline documentation and the existing wiring assertion.
File Description
devops/​scripts/​ci/​test_pipeline_input_safety.py Updates the expected count of signed-artifact consumers.
.azure-pipelines/​templates/​dist/​stages/​publish-docker-to-acr.yml Removes image preparation and retains gated publication and registry verification.
.azure-pipelines/​templates/​dist/​stages/​build-signed-powershell-docker.yml Adds shared signed-image build, version metadata, and native smoke validation.
.azure-pipelines/​azclips-stable-release.yml Invokes shared preparation before Docker publication.
.azure-pipelines/​azclips-stable-release-test.yml Uses the same preparation and publication sequence.
.azure-pipelines/​azclips-beta-sign.yml Adds signed-image preparation without registry publication.
.azure-pipelines/​AGENTS.md Documents stage ownership, version handling, and pipeline behavior.

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 23:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Live beta-sign and stable-test runs have not been executed, leaving native AMD64/ARM64 Docker readiness and the artifact/version hand-off to publication unverified.

No open issues 🎉

Review effort: Balanced

Document distribution/image and Az module version metadata together, and require both signed image architectures to match the release version before publication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 19, 2026 22:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Live beta-signing and stable-test runs still need human review to validate the shared signed-image hand-off, native AMD64/ARM64 builds, smoke tests, and publication gates.

No open issues 🎉

Review effort: Balanced

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

This branch has not been deployed

No deployments
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