Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented Dec 8, 2025

This pull request refactors and modernizes the Azure Pipelines YAML configuration for .NET for Android, with a focus on improving maintainability, reusability, and clarity. The main changes involve introducing shared build step templates for macOS and Linux, simplifying the main public pipeline YAML, and cleaning up the Linux build pipeline to use these new templates.

Key changes include:

Pipeline Structure & Modularity:

  • Introduced new shared templates: build-macos-steps.yaml and build-linux-steps.yaml, encapsulating the core build logic for macOS and Linux respectively, and removing direct references to private repositories. This allows both public and private pipelines to reuse the same build steps.
  • Updated the main public pipeline definition (azure-pipelines-public.yaml) to use these shared templates for the macOS and Linux build stages, and to streamline job definitions.

Linux Build Pipeline Cleanup:

  • Refactored build-linux.yaml to delegate all build logic to the new build-linux-steps.yaml template, removing duplicated inline steps and making the pipeline more maintainable.

Build Artifact Management:

  • Standardized the copying, packaging, and publishing of build artifacts (such as NuGet packages, symbols, test assemblies, and toolchain pdbs) via the new templates, ensuring consistent artifact handling across platforms.

Pipeline Parameters and Conditions:

  • Improved parameterization and variable handling in the main pipeline YAML, including logic to skip test stages for non-fork PRs and to select appropriate agent images and pools for public builds.

These changes make the build pipeline easier to maintain, encourage reuse, and reduce duplication.


Most important changes:

Pipeline Modularity and Refactoring

  • Added build-macos-steps.yaml and build-linux-steps.yaml templates to encapsulate platform-specific build logic, making it reusable and independent of private repos.
  • Updated azure-pipelines-public.yaml to use these new templates, simplifying stage and job definitions for public builds.

Linux Build Pipeline Improvements

  • Refactored build-linux.yaml to remove inline build steps and instead invoke the new build-linux-steps.yaml template, reducing duplication and centralizing logic.

Artifact Handling Standardization

  • Unified the process for copying, deleting, packaging, and publishing build artifacts (including NuGet packages, symbols, test assemblies, and toolchain pdbs) within the new templates for both macOS and Linux.

Pipeline Parameters and Test Skipping Logic

  • Enhanced parameterization and variable logic in azure-pipelines-public.yaml to control test execution and agent selection, including auto-skipping tests for non-fork PRs.

@jonathanpeppers
Copy link
Member Author

Example green dnceng pipeline (all tests):

@jonathanpeppers jonathanpeppers marked this pull request as ready for review December 16, 2025 15:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jonathanpeppers jonathanpeppers merged commit bb5968d into main Dec 18, 2025
57 of 59 checks passed
@jonathanpeppers jonathanpeppers deleted the dev/peppers/dnceng-public branch December 18, 2025 22:21
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.

2 participants