Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
ae9e4a6
FEAT: standalone conda BUILD pipeline + validation tooling
jahnvi480 Sep 3, 2026
91575be
Merge branch 'main' into jahnvi/conda-build-pipeline
jahnvi480 Sep 4, 2026
84ce358
FIX: PR #744 review — .ps1 dedicated conda_builder env, drop the buil…
jahnvi480 Sep 4, 2026
6d9f39c
FIX: PR #744 review preempts — harden validate-step inputs + focus te…
jahnvi480 Sep 4, 2026
acc2993
FIX: PR #744 rubber-duck round — silent-pass / security hardening
jahnvi480 Sep 4, 2026
bc915c4
FIX: preserve stderr on the win-arm64 best-effort paths (2>&1 capture…
jahnvi480 Sep 4, 2026
8d9870e
REFACTOR: collapse conda build scripts into build_conda_packages.py o…
jahnvi480 Sep 4, 2026
c200b5a
FIX: repoint tls_connect_probe.py comment to build_conda_packages.py
jahnvi480 Sep 4, 2026
f78f4f1
REFACTOR: drop the dormant live-TLS gate from the conda BUILD pipeline
jahnvi480 Sep 4, 2026
c12d568
FIX: verify() imports the conda package, not the shadowing repo sourc…
jahnvi480 Sep 4, 2026
cd7b545
FIX: verify imports FAIL-CLOSED assert the package is under sys.prefi…
jahnvi480 Sep 4, 2026
b8074e4
DOC: clarify Windows conda step template param comments (pythonVersio…
jahnvi480 Sep 4, 2026
28d3675
FIX: win conda step passes --conda-target-subdir/--python-versions as…
jahnvi480 Sep 4, 2026
2563cf7
FIX: review round -- import-probe abspath (softlink), consolidate str…
jahnvi480 Sep 4, 2026
81072ee
Merge branch 'main' into jahnvi/conda-build-pipeline
jahnvi480 Sep 4, 2026
55e56c4
FIX: QEMU/binfmt install step is continueOnError so an apt flake cann…
jahnvi480 Sep 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
354 changes: 354 additions & 0 deletions OneBranchPipelines/conda-build-pipeline.yml

Large diffs are not rendered by default.

129 changes: 129 additions & 0 deletions OneBranchPipelines/jobs/consolidate-conda-artifacts-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Consolidate Conda Artifacts Job Template
# Collects the per-platform self-contained mssql-python conda packages (which vendor
# the ODBC payload) that each build leg staged under conda/<subdir>/ and gathers
# them into a single conda/ tree for the release pipeline to publish.
#
# BEST-EFFORT (build pipeline): conda is a downstream repackage of the ESRP-signed
# wheels and must NEVER block the primary wheel deliverable, so a missing/short set
# only WARNS here. The HARD count gate lives in the release pipeline (which refuses
# to publish an incomplete conda set), symmetric with how the wheel/odbc drops are
# best-effort collected in the build and gated at release time.
#
# Expected packages (validated conda subdirs). The self-contained mssql-python
# package (which vendors the ODBC payload) is emitted per-Python by each build leg;
# there is NO separate companion package:
# win-64 : 5 py x mssql-python = 5
# win-arm64 : 3 py x mssql-python (py3.12-3.14, cross-built on x64) = 3
# osx-64 : 5 py x mssql-python (Intel Mac, cross-built via Rosetta) = 5
# osx-arm64 : 5 py x mssql-python (Apple Silicon, native) = 5
# linux-64 : 5 py x mssql-python (glibc x86_64 host, native) = 5
# linux-aarch64 : 5 py x mssql-python (x86_64 host + QEMU, best-effort) = 5
# ------------------------------------------------------------------------------
# TOTAL (PyPI parity minus musllinux) = 28
# win-arm64 is cross-built for py3.12-3.14 only (py3.10/3.11 have no win-arm64 deps
# on Anaconda defaults); its runtime import is skipped on the x64 host, so its arch
# is enforced by the PE-machine assert (assert_pe_machine.py). musllinux (no conda
# musl subdir) is intentionally NOT conda-built. This job is BEST-EFFORT and never
# hard-fails on a short set; the release pipeline's conda-release-step enforces the
# hard gate (required subdirs present + complete Python matrix) before publish.
parameters:
- name: oneBranchType
type: string
default: 'Official'
# Artifact item pattern the consolidate job downloads. Defaults to the integrated
# wheel-pipeline leg artifacts; the standalone conda-build pipeline overrides it with
# its drop_Conda* leg artifacts.
- name: downloadItemPattern
type: string
default: |
drop_Win_*/**
drop_MacOS_*/**
drop_Linux_*/**
drop_ODBC_BuildAll_*/**

jobs:
- job: ConsolidateArtifacts
displayName: 'Consolidate All Conda Packages'
condition: succeeded()

pool:
type: linux
isCustom: true
name: Azure Pipelines
vmImage: 'ubuntu-latest'

variables:
# Consolidation only moves files; no binaries to scan.
- name: ob_sdl_binskim_enabled
value: false
- name: ob_outputDirectory
value: '$(Build.ArtifactStagingDirectory)'

steps:
- checkout: self
fetchDepth: 1

# The conda packages are staged INSIDE the mssql-python build-leg artifacts
# (drop_Win_*, drop_MacOS_*, drop_Linux_*) under conda/<subdir>/. Scope the
# download to those stages so every leg's self-contained mssql-python conda is
# gathered in one place. (drop_ODBC_BuildAll_* is included only for its wheels,
# which ride along and are ignored below -- we pick only *.conda / *.tar.bz2.)
- task: DownloadPipelineArtifact@2
displayName: 'Download All Platform Artifacts'
inputs:
buildType: 'current'
itemPattern: ${{ parameters.downloadItemPattern }}
targetPath: '$(Pipeline.Workspace)/all-artifacts'

- bash: |
set -euo pipefail
echo "Collecting conda packages (preserving <subdir>/ layout)..."
mkdir -p "$(ob_outputDirectory)/conda"

# Copy every mssql-python* conda package into conda/<subdir>/. Each build
# leg wrote the self-contained mssql-python package under a conda/<subdir>/
# folder, so the parent dir name IS the target subdir.
found=0
while IFS= read -r p; do
subdir=$(basename "$(dirname "$p")")
mkdir -p "$(ob_outputDirectory)/conda/$subdir"
cp -v "$p" "$(ob_outputDirectory)/conda/$subdir/"
found=1
done < <(find "$(Pipeline.Workspace)/all-artifacts" -type f \( -name 'mssql-python*.conda' -o -name 'mssql-python*.tar.bz2' \))

echo ""
echo "Consolidated conda tree:"
find "$(ob_outputDirectory)/conda" -type f | sort

PKG_COUNT=$(find "$(ob_outputDirectory)/conda" -type f \( -name '*.conda' -o -name '*.tar.bz2' \) | wc -l)
echo ""
echo "Per-subdir conda package counts:"
for d in "$(ob_outputDirectory)"/conda/*/; do
[ -d "$d" ] || continue
sub=$(basename "$d")
n=$(find "$d" -type f \( -name '*.conda' -o -name '*.tar.bz2' \) | wc -l)
printf ' %-14s %s\n' "$sub" "$n"
done
echo "Total conda package count: $PKG_COUNT (full PyPI-parity set = 28)"

# BEST-EFFORT: warn only, never exit non-zero — a conda hiccup on any leg
# must not fail this build or block the wheel release. The release pipeline's
# conda-release-step enforces the hard gate (required subdirs + full Python
# matrix) before anything is published.
if [ "$found" != "1" ]; then
echo "##vso[task.logissue type=warning]No conda packages found in the build-leg artifacts."
else
echo "Collected $PKG_COUNT conda package(s) (best-effort; release-time gate enforces completeness)."
fi
displayName: 'Consolidate conda packages'

- task: PublishPipelineArtifact@1
displayName: 'Publish Consolidated Conda Artifacts'
inputs:
targetPath: '$(ob_outputDirectory)'
# Distinct name so it does not collide with the wheel consolidate artifact
# (drop_Consolidate_ConsolidateArtifacts) or the odbc one
# (drop_ConsolidateOdbc_ConsolidateArtifacts) in the same run. Matches the
# OneBranch auto-name for a stage named `ConsolidateConda`.
artifact: 'drop_ConsolidateConda_ConsolidateArtifacts'
publishLocation: 'pipeline'
1 change: 1 addition & 0 deletions OneBranchPipelines/scripts/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
Loading
Loading