Skip to content

Add OneBranch pipeline templates for CI and Release#925

Open
RyAuld wants to merge 14 commits into
devfrom
ryauld/onebranch-pipelines
Open

Add OneBranch pipeline templates for CI and Release#925
RyAuld wants to merge 14 commits into
devfrom
ryauld/onebranch-pipelines

Conversation

@RyAuld

@RyAuld RyAuld commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Wraps existing CI and release pipelines with OneBranch pipeline templates for compliance (SDL, TSA, CodeQL).

Changes

  • azure-pipelines.yml: Extended with v2/OneBranch.NonOfficial.CrossPlat.yml template. Added globalSdl config for CredScan, PoliCheck, CodeQL (Python). Converted Benchmark stage to OneBranch pool syntax.
  • .Pipelines/pipeline-publish.yml: Extended with v2/OneBranch.Official.CrossPlat.yml template. Added ManualValidation approval gate. Includes ESRP client ID fix. Converted deployment job to regular job (OneBranch compatibility).
  • .Pipelines/template-pipeline-stages.yml: Removed explicit PreBuildCheck/SDL stage (handled by OneBranch globalSdl). Converted pools to OneBranch syntax (type: linux, isCustom: true, ubuntu-22.04). Added ob_outputDirectory variable to all jobs.
  • .config/tsaoptions.json: New file required for OneBranch TSA (security scan results upload).

ADO Pipeline Changes

  • Disabled reportBuildStatus on redundant pipelines (2708, 769, 3067) so only MSAL.Python-PR-OneBranch-Official (3064) reports PR status.
  • Registered pipeline 3067 in Product Catalog as Production (required by OneBranch Official template).
  • Disabled MSAL-Python-SDL-CI (769) - classic pipeline running CredScan, PoliCheck, Component Detection, and SBOM. All of these are now handled by OneBranch globalSdl and auto-injected tasks.

Validation

RyAuld and others added 8 commits June 5, 2026 13:50
- azure-pipelines.yml: extends v2/OneBranch.NonOfficial.CrossPlat.yml
- pipeline-publish.yml: extends v2/OneBranch.Official.CrossPlat.yml
- template-pipeline-stages.yml: remove PreBuildCheck stage (SDL now via
  globalSdl), convert pools to OneBranch syntax (type: linux, isCustom,
  ob_outputDirectory)

OneBranch provides: TSA, CredScan, PoliCheck, CodeQL (Python), and
compliance tracking. Release pipeline adds ManualValidation@1 approval
gate before ESRP publish.

Also includes ESRP client ID fix (38d4 -> 384d).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Rename PublishPipelineArtifact artifacts to drop_<stage>_<job> convention
- Add default values for packageVersion and publishTarget parameters
- Fixes pipeline queue validation errors

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
OneBranch custom Linux pools don't support deployment strategy (runOnce).
Convert to a regular job with explicit artifact download.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Required by OneBranch SDL pipeline to upload security scan results to TSA.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1ES PT requires 1ES Hosted Pools for Official templates. Remove isCustom/vmImage
and let OneBranch manage pool selection with just 'type: linux'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
OneBranch auto-publishes artifacts from ob_outputDirectory at job end.
Explicit PublishPipelineArtifact tasks are not allowed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Without isCustom, OneBranch tries to run in a container using
LinuxContainerImage variable which isn't configured. isCustom: true
tells OneBranch to use MS-hosted agents directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@RyAuld RyAuld requested a review from a team as a code owner June 8, 2026 21:44
Copilot AI review requested due to automatic review settings June 8, 2026 21:44

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.

Pull request overview

This PR migrates the repository’s Azure DevOps CI and release pipelines to OneBranch governed templates to meet compliance requirements (SDL/TSA/CodeQL), while preserving the existing test/build/publish flow.

Changes:

  • Wraps CI and release pipelines using OneBranch v2 governed templates and configures globalSdl (CredScan, PoliCheck, CodeQL + TSA upload).
  • Refactors shared stages template to remove the bespoke SDL stage and updates pools/jobs to OneBranch-compatible syntax (including ob_outputDirectory).
  • Adds .config/tsaoptions.json required for OneBranch TSA integration.

Reviewed changes

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

File Description
azure-pipelines.yml Switches PR/CI to OneBranch NonOfficial template and updates Benchmark stage to OneBranch pool/output patterns.
.Pipelines/template-pipeline-stages.yml Removes explicit SDL stage (now handled by OneBranch), updates pool syntax, and adds ob_outputDirectory per job.
.Pipelines/pipeline-publish.yml Switches release pipeline to OneBranch Official template, adds an explicit approval stage for prod, and adapts build/publish to OneBranch artifact/output conventions.
.config/tsaoptions.json Introduces OneBranch TSA options configuration for security results upload.

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

Comment thread .Pipelines/pipeline-publish.yml Outdated
Comment thread .Pipelines/template-pipeline-stages.yml
Comment thread .Pipelines/template-pipeline-stages.yml
- Resolve merge conflict (keep OneBranch rewrite, ESRP fix unchanged)
- Remove packageVersion default to force explicit input on each release
- Pin vmImage to ubuntu-22.04 for reproducibility

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@RyAuld

RyAuld commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Addressed all review comments in latest push:

  1. packageVersion default removed - no longer hardcoded. Validate stage will force explicit input on each release.
  2. Pinned ubuntu-22.04 across all jobs in template-pipeline-stages.yml, pipeline-publish.yml, and azure-pipelines.yml for reproducibility.

Also resolved merge conflict with dev (ESRP fix already present in our branch) and disabled reportBuildStatus on the old/redundant pipelines (2708, 769, 3067) so only the PR pipeline reports status.

Comment thread .Pipelines/pipeline-publish.yml
Copilot AI review requested due to automatic review settings June 8, 2026 22:53
enabled: false
interpretedLanguages: python
tsaEnabled: true
featureFlags:

@Avery-Dunn Avery-Dunn Jun 8, 2026

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.

There was an SFI item we had to handle earlier this year that request 1ES approved build agents through the WindowsHostVersion: '1ESWindows2022' feature flag:

Without it we might get a new SFI item, though I'm not sure because it might've been because MSAL .NET was explicitly using custom build agents in some stages.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What is the recommended version for Linux?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I looked into the docs and I don't think this is a hard requirement. It also locks you into a specific image version. I'd like to merge as-is and see if it produces a warning like the Windows version did. It may only be required for Windows agents since that's where the SFI item originated.

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.

Pull request overview

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

Comment thread .Pipelines/pipeline-publish.yml Outdated
Comment thread azure-pipelines.yml
Comment thread .Pipelines/pipeline-publish.yml
Comment thread .Pipelines/template-pipeline-stages.yml
Copilot AI review requested due to automatic review settings June 8, 2026 23:39

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.

Pull request overview

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

Comment thread .Pipelines/template-pipeline-stages.yml
Comment thread .Pipelines/pipeline-publish.yml
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