Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 53
CHORE: Add OneBranch release pipelines for mssql-python-odbc#664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
b845621c19a26162910b438b9ff9d85fd92e3cf2a9a4b4e59b88e1690346212d1b3d469f93c362d93fe0a4e39689d3097cfdb02cb79d60bad4b82a668b7ba07a1d3517e5947e68cba530772cc052dbd7b19f1db12038ca6926ba5372c3c88b15c8ad3caadc79580488564ee039de3f4d7795a2d78f0a026f60f30b8f813a433a1fbd10a199e2647e3f23df6967ecc86File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Consolidate ODBC Artifacts Job Template | ||
| # Downloads the per-platform `mssql-python-odbc` wheels from all build stages and | ||
| # consolidates them into a single dist/ folder for the release pipeline to publish. | ||
| # Expected: 7 wheels (2 Windows + 1 macOS universal2 + 4 Linux). | ||
| parameters: | ||
| - name: oneBranchType | ||
| type: string | ||
| default: 'Official' | ||
| - name: expectedWheelCount | ||
| type: number | ||
| default: 7 | ||
| jobs: | ||
| - job: ConsolidateArtifacts | ||
| displayName: 'Consolidate All ODBC Platform Artifacts' | ||
| 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 | ||
| # Download only the mssql-python-odbc platform-stage artifacts (drop_ODBC_*) from | ||
| # the current build. The same run also builds the mssql-python wheels (drop_Win_*, | ||
| # drop_MacOS_*, drop_Linux_*); itemPattern scopes this download to the odbc stages | ||
| # so ONLY the 7 odbc wheels are consolidated here (not the mssql-python wheels). | ||
| - task: DownloadPipelineArtifact@2 | ||
| displayName: 'Download All ODBC Platform Artifacts' | ||
| inputs: | ||
| buildType: 'current' | ||
| itemPattern: 'drop_ODBC_*/**' | ||
| targetPath: '$(Pipeline.Workspace)/all-artifacts' | ||
| - bash: | | ||
| set -e | ||
| mkdir -p $(ob_outputDirectory)/dist | ||
| echo "Finding all .whl files..." | ||
| find $(Pipeline.Workspace)/all-artifacts -name "*.whl" -exec ls -lh {} \; | ||
| echo "Copying all wheels to consolidated dist/..." | ||
| find $(Pipeline.Workspace)/all-artifacts -name "*.whl" -exec cp -v {} $(ob_outputDirectory)/dist/ \; | ||
| echo "Consolidated wheels:" | ||
| ls -lh $(ob_outputDirectory)/dist/ | ||
| WHEEL_COUNT=$(ls -1 $(ob_outputDirectory)/dist/*.whl 2>/dev/null | wc -l) | ||
| echo "Total wheel count: $WHEEL_COUNT (expected ${{ parameters.expectedWheelCount }})" | ||
| if [ "$WHEEL_COUNT" -ne "${{ parameters.expectedWheelCount }}" ]; then | ||
| echo "ERROR: expected ${{ parameters.expectedWheelCount }} wheels but found $WHEEL_COUNT" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "SUCCESS: all ${{ parameters.expectedWheelCount }} ODBC wheels consolidated." | ||
| displayName: 'Consolidate ODBC wheels' | ||
| - task: PublishPipelineArtifact@1 | ||
| displayName: 'Publish Consolidated ODBC Artifacts' | ||
| inputs: | ||
| targetPath: '$(ob_outputDirectory)' | ||
| # Distinct name so it does not collide with the mssql-python consolidate | ||
| # artifact (drop_Consolidate_ConsolidateArtifacts) in the same build run. | ||
| # Matches the OneBranch auto-name for a stage named `ConsolidateOdbc`. | ||
| artifact: 'drop_ConsolidateOdbc_ConsolidateArtifacts' | ||
| publishLocation: 'pipeline' | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.