Skip to content

CHORE: add OneBranch build & package pipeline - #548

Merged
bewithgaurav merged 2 commits into
devfrom
bewithgaurav/onebranch-build-pipeline
Jul 27, 2026
Merged

CHORE: add OneBranch build & package pipeline#548
bewithgaurav merged 2 commits into
devfrom
bewithgaurav/onebranch-build-pipeline

Conversation

@bewithgaurav

Copy link
Copy Markdown
Collaborator

What

Adds OneBranchPipelines/build-release-package-pipeline.yml — the OneBranch Official build that produces the mssql-django sdist + universal wheel and publishes the drop artifact consumed by the Official-Release and Dummy-Release pipelines.

Design

  • Pure-Python: a single python -m build produces one universal wheel + sdist — no platform matrix, no native compilation, no symbols (unlike mssql-python's build).
  • regex_clr.dll: fetched at build time with authenticated access (AzureCLI@2 + managed identity, az storage blob download --auth-mode login) from the private storage account. This replaces the legacy anonymous wget, which no longer works — the account has allowBlobPublicAccess=false / publicNetworkAccess=Disabled.
  • Pool: Django-1ES-pool, which is allow-listed on that storage account's network (so the authenticated fetch can reach it).
  • SDL: SBOM + CredScan/PoliCheck/TSA via the OneBranch Official template; TSA/CredScan configs from .config/ (PR CHORE: add OneBranch release pipeline scaffolding #546).
  • Source: the pipeline's source repo is the ADO mirror (checkout: self) — SDL-clean.

Prerequisites (ADO side — done when wiring the definition)

  1. A build pipeline definition sourcing this YAML from the ADO mssql-django mirror.
  2. A RegexClrServiceConnection ARM service connection whose identity has Storage Blob Data Reader on mssqldjangostorage (sub Magnitude Test 1, RG django).

Depends on

Draft until the ADO build definition + service connection are wired.

Adds OneBranchPipelines/build-release-package-pipeline.yml -- the OneBranch
Official build that produces the mssql-django sdist + universal wheel and
publishes the 'drop' artifact consumed by the release pipelines.

- Pure-Python: single `python -m build` (no platform matrix / native / symbols).
- regex_clr.dll fetched with authenticated access (AzureCLI managed identity,
  --auth-mode login) from the private storage account -- replaces the old
  anonymous wget, which no longer works (public access disabled).
- Runs on Django-1ES-pool (allow-listed on the storage account network).
- Pipeline source = ADO mirror (checkout: self); SBOM + SDL via OneBranch.

Prerequisites (ADO side): a build pipeline definition sourcing this YAML from
the ADO mirror; a `RegexClrServiceConnection` ARM service connection whose
identity has Storage Blob Data Reader on the mssqldjangostorage account.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bewithgaurav
bewithgaurav marked this pull request as ready for review July 27, 2026 07:17
Copilot AI review requested due to automatic review settings July 27, 2026 07:17

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

Adds a new Azure DevOps OneBranch “Official” build pipeline to produce mssql-django distribution artifacts (sdist + universal wheel), fetch regex_clr.dll at build time using authenticated Azure access, and publish the OneBranch drop artifact for downstream release pipelines.

Changes:

  • Introduces OneBranchPipelines/build-release-package-pipeline.yml with main/pr/nightly triggers and OneBranch Official governed template usage.
  • Adds steps to authenticate to an internal pip feed, download regex_clr.dll via az storage blob download --auth-mode login, and build/publish package artifacts + SBOM.
Comments suppressed due to low confidence (3)

OneBranchPipelines/build-release-package-pipeline.yml:80

  • pool.demands is malformed YAML: the list item is not indented under demands:. As written, the pipeline YAML won’t parse (and the job won’t start).
              demands:
              - imageOverride -equals Ubuntu22.04-AzurePipelines

OneBranchPipelines/build-release-package-pipeline.yml:60

  • globalSdl.credscan.suppressionsFile points at $(Build.SourcesDirectory)/.config/CredScanSuppressions.json, but there is no .config/ directory in this branch. CredScan will fail when it tries to load the suppressions file. Add the file (e.g., via the scaffold in PR #546) or update the path to where the suppressions file actually lives.
      credscan:
        enabled: true
        suppressionsFile: $(Build.SourcesDirectory)/.config/CredScanSuppressions.json

OneBranchPipelines/build-release-package-pipeline.yml:66

  • globalSdl.tsa.configFile points at $(Build.SourcesDirectory)/.config/tsaoptions.json, but there is no .config/ directory in this branch. TSA configuration loading will fail. Add the TSA config file (e.g., from PR #546) or update this path to the correct location.
      tsa:
        enabled: true
        configFile: $(Build.SourcesDirectory)/.config/tsaoptions.json

Comment thread OneBranchPipelines/build-release-package-pipeline.yml
@bewithgaurav
bewithgaurav merged commit 741ecb8 into dev Jul 27, 2026
6 of 66 checks passed
bewithgaurav added a commit that referenced this pull request Jul 27, 2026
Completes the release loop on top of the build pipeline (PR #548):

- official-release-pipeline.yml: OneBranch Official. Downloads the build's
  'drop' artifact and releases to PyPI via ESRP. Gated by releaseToPyPI
  (default false = dry run) so a run never publishes by accident.
- dummy-release-pipeline.yml: OneBranch NonOfficial. Exercises the full ESRP
  path against a Maven ContentType (never PyPI), to validate release wiring
  safely.

Both consume the build via a `pipelines:` resource (download: buildPipeline),
so no build definition id is hard-coded.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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