FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fold mssql-python-odbc build+release into existing pipelines · microsoft/mssql-python@68b7ba0 · GitHub

Commit 68b7ba0

Browse files
committed
Fold mssql-python-odbc build+release into existing pipelines
Per review feedback, build and release the standalone mssql-python-odbc package from the existing Build-Release-Package-Pipeline (def 2199) and official release pipeline instead of separate ADO definitions. Build pipeline: add odbcWindows/Macos/LinuxConfigs params (2+1+4=7 data-only wheels), reference the 3 odbc stage templates alongside the mssql-python stages, and add a separate ConsolidateOdbc stage publishing drop_ConsolidateOdbc_ConsolidateArtifacts (distinct from mssql-python's drop_Consolidate_ConsolidateArtifacts). Release pipeline: add releasePackage parameter (mssql-python | mssql-python-odbc); select the consolidated artifact accordingly and skip symbol publishing + mssql-py-core version validation for odbc. Delete the redundant standalone orchestrators (build-release-odbc-pipeline.yml, official-release-odbc-pipeline.yml). This removes the need to register a new ADO build definition and the odbcBuildDefinitionId placeholder. Both packages now build from def 2199; the odbc stages consume setup_odbc.py from PR #663, so #663 must merge before these stages can build.
1 parent d4b82a6 commit 68b7ba0

5 files changed

Lines changed: 136 additions & 469 deletions

‎OneBranchPipelines/build-release-odbc-pipeline.yml‎

Lines changed: 0 additions & 211 deletions
This file was deleted.

‎OneBranchPipelines/build-release-package-pipeline.yml‎

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,33 @@ parameters:
138138
- { tag: 'musllinux', arch: 'x86_64', platform: 'linux/amd64' }
139139
- { tag: 'musllinux', arch: 'aarch64', platform: 'linux/arm64' }
140140

141+
# =========================
142+
# ODBC PACKAGE CONFIGURATIONS (mssql-python-odbc)
143+
# =========================
144+
# The standalone mssql-python-odbc package ships ONLY pre-built ODBC driver
145+
# binaries (data) — there is NO compiled extension — so ONE py3-none-<platform>
146+
# wheel per platform serves every supported Python version. Hence there is no
147+
# per-Python matrix here: 7 wheels total (2 Windows + 1 macOS + 4 Linux).
148+
# These stages build alongside the mssql-python wheels and are consolidated
149+
# SEPARATELY (see the ConsolidateOdbc stage) so the release pipeline can publish
150+
# mssql-python and mssql-python-odbc independently.
151+
- name: odbcWindowsConfigs
152+
type: object
153+
default:
154+
- { arch: 'x64' }
155+
- { arch: 'arm64' }
156+
- name: odbcMacosConfigs
157+
type: object
158+
default:
159+
- { name: 'universal2' }
160+
- name: odbcLinuxConfigs
161+
type: object
162+
default:
163+
- { tag: 'manylinux_2_28', arch: 'x86_64', platform: 'linux/amd64' }
164+
- { tag: 'manylinux_2_28', arch: 'aarch64', platform: 'linux/arm64' }
165+
- { tag: 'musllinux', arch: 'x86_64', platform: 'linux/amd64' }
166+
- { tag: 'musllinux', arch: 'aarch64', platform: 'linux/arm64' }
167+
141168
# =========================
142169
# PIPELINE VARIABLES
143170
# =========================
@@ -338,8 +365,10 @@ extends:
338365
# =========================
339366
# PIPELINE STAGES
340367
# =========================
341-
# Total stages: 9 Windows + 5 macOS + 4 Linux + 1 Consolidate = 19 stages
342-
# Stages run in parallel (no dependencies between platform builds)
368+
# mssql-python: 9 Windows + 5 macOS + 4 Linux + 1 Consolidate = 19 stages
369+
# mssql-python-odbc: 2 Windows + 1 macOS + 4 Linux + 1 ConsolidateOdbc = 8 stages
370+
# Total: 27 stages. All build stages run in parallel; each Consolidate* stage
371+
# waits only on its own package's build stages.
343372
stages:
344373
# =========================
345374
# WINDOWS BUILD STAGES
@@ -466,3 +495,64 @@ extends:
466495

467496
# Note: Symbol publishing handled directly in Windows build stages
468497
# PDB files uploaded to Microsoft Symbol Server for debugging
498+
499+
# =========================================================================
500+
# ODBC PACKAGE BUILD STAGES (mssql-python-odbc)
501+
# =========================================================================
502+
# 7 data-only wheels (no native compile, no pytest) built from setup_odbc.py.
503+
# They run in parallel with the mssql-python stages and are consolidated by a
504+
# SEPARATE ConsolidateOdbc stage so the release pipeline can ship each package
505+
# independently. SDL "just works": these wheels contain the SAME ODBC driver
506+
# binaries already scanned in mssql_python/libs by the main build — no new
507+
# first-party native code is introduced.
508+
#
509+
# ODBC Windows stages (2): ODBC_Win_x64, ODBC_Win_arm64
510+
- ${{ each config in parameters.odbcWindowsConfigs }}:
511+
- template: /OneBranchPipelines/stages/build-odbc-windows-stage.yml@self
512+
parameters:
513+
stageName: ODBC_Win_${{ config.arch }}
514+
jobName: BuildWheel
515+
architecture: ${{ config.arch }}
516+
oneBranchType: '${{ variables.effectiveOneBranchType }}'
517+
518+
# ODBC macOS stage (1): ODBC_MacOS_universal2
519+
- ${{ each config in parameters.odbcMacosConfigs }}:
520+
- template: /OneBranchPipelines/stages/build-odbc-macos-stage.yml@self
521+
parameters:
522+
stageName: ODBC_MacOS_${{ config.name }}
523+
jobName: BuildWheel
524+
oneBranchType: '${{ variables.effectiveOneBranchType }}'
525+
526+
# ODBC Linux stages (4): manylinux_2_28 x86_64/aarch64, musllinux x86_64/aarch64
527+
- ${{ each config in parameters.odbcLinuxConfigs }}:
528+
- template: /OneBranchPipelines/stages/build-odbc-linux-stage.yml@self
529+
parameters:
530+
stageName: ODBC_Linux_${{ config.tag }}_${{ config.arch }}
531+
jobName: BuildWheel
532+
linuxTag: ${{ config.tag }}
533+
arch: ${{ config.arch }}
534+
dockerPlatform: ${{ config.platform }}
535+
oneBranchType: '${{ variables.effectiveOneBranchType }}'
536+
537+
# =========================================================================
538+
# CONSOLIDATE ODBC STAGE
539+
# =========================================================================
540+
# Collects the 7 mssql-python-odbc wheels into a single dist/ folder and
541+
# publishes them as `drop_ConsolidateOdbc_ConsolidateArtifacts` (distinct from
542+
# the mssql-python `drop_Consolidate_ConsolidateArtifacts`). The release
543+
# pipeline selects one artifact based on its `releasePackage` parameter.
544+
- stage: ConsolidateOdbc
545+
displayName: 'Consolidate All ODBC Artifacts'
546+
dependsOn:
547+
- ODBC_Win_x64
548+
- ODBC_Win_arm64
549+
- ODBC_MacOS_universal2
550+
- ODBC_Linux_manylinux_2_28_x86_64
551+
- ODBC_Linux_manylinux_2_28_aarch64
552+
- ODBC_Linux_musllinux_x86_64
553+
- ODBC_Linux_musllinux_aarch64
554+
jobs:
555+
- template: /OneBranchPipelines/jobs/consolidate-odbc-artifacts-job.yml@self
556+
parameters:
557+
oneBranchType: '${{ variables.effectiveOneBranchType }}'
558+
expectedWheelCount: 7

‎OneBranchPipelines/jobs/consolidate-odbc-artifacts-job.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,8 @@ jobs:
6464
displayName: 'Publish Consolidated ODBC Artifacts'
6565
inputs:
6666
targetPath: '$(ob_outputDirectory)'
67-
artifact: 'drop_Consolidate_ConsolidateArtifacts'
67+
# Distinct name so it does not collide with the mssql-python consolidate
68+
# artifact (drop_Consolidate_ConsolidateArtifacts) in the same build run.
69+
# Matches the OneBranch auto-name for a stage named `ConsolidateOdbc`.
70+
artifact: 'drop_ConsolidateOdbc_ConsolidateArtifacts'
6871
publishLocation: 'pipeline'

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL