Skip to content

Commit 44f755b

Browse files
authored
FIX: Update OneBranch pipelines for new 1ES images (Windows/Linux) (#431)
### Work Item / Issue Reference <!-- IMPORTANT: Please follow the PR template guidelines below. For mssql-python maintainers: Insert your ADO Work Item ID below For external contributors: Insert Github Issue number below Only one reference is required - either GitHub issue OR ADO Work Item. --> <!-- mssql-python maintainers: ADO Work Item --> > [AB#42398](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/42398) <!-- External contributors: GitHub Issue --> > GitHub Issue: #<ISSUE_NUMBER> ------------------------------------------------------------------- ### Summary <!-- Insert your summary of changes below. Minimum 10 characters required. --> This pull request updates the build pipeline configurations to use new agent pools and images for Windows and Linux builds, and improves Docker handling for Linux stages. The changes modernize the build environments and streamline Docker setup, while also updating macOS pool configuration for compatibility. Build environment updates: * Switched Windows and Linux agent pools from `Django-1ES-pool` to `Python-1ES-pool`, and updated image demands to `PYTHON-1ES-MMS2022` (Windows) and `PYTHON-1ES-UB2404` (Linux) across all pipeline YAML files. [[1]](diffhunk://#diff-3db20ac3b805d9b3612357e92c428cda06eaa8a8fa2fafe94ecc247177608996L204-R205) [[2]](diffhunk://#diff-f33e687de954b798773c221fa2242934d5ec593abda31b787cdb10d590c1cb76L99-R101) [[3]](diffhunk://#diff-27a96a9aa4f8678027cc712c73505b5351a98bcd22501bbf5f0ed9617a7a6bffL102-R104) [[4]](diffhunk://#diff-3be0faed094a0cc74e9ec006d00e54b2f4178571f1f7eb13de87467df606f86aL38-R40) [[5]](diffhunk://#diff-b134d9c8339176b133043f7c9407b630a17f96f764c7b88106599f4b27a26d85L41-R43) * Updated macOS pool configuration in `build-macos-single-stage.yml` to use `image: macOS-latest`, add `os: macOS`, and clarify pool type requirements for OneBranch and Azure Pipelines compatibility. Docker setup improvements (Linux builds): * Removed explicit Docker installation task, since Docker is now pre-installed via the `linux-1es-pt-prerequisites-v2` artifact. * Enhanced Docker daemon startup logic: now checks if Docker is running before starting it, avoiding unnecessary restarts and improving reliability. <!-- ### PR Title Guide > For feature requests FEAT: (short-description) > For non-feature requests like test case updates, config updates , dependency updates etc CHORE: (short-description) > For Fix requests FIX: (short-description) > For doc update requests DOC: (short-description) > For Formatting, indentation, or styling update STYLE: (short-description) > For Refactor, without any feature changes REFACTOR: (short-description) > For release related changes, without any feature changes RELEASE: #<RELEASE_VERSION> (short-description) ### Contribution Guidelines External contributors: - Create a GitHub issue first: https://github.com/microsoft/mssql-python/issues/new - Link the GitHub issue in the "GitHub Issue" section above - Follow the PR title format and provide a meaningful summary mssql-python maintainers: - Create an ADO Work Item following internal processes - Link the ADO Work Item in the "ADO Work Item" section above - Follow the PR title format and provide a meaningful summary -->
1 parent 2ab85b7 commit 44f755b

5 files changed

Lines changed: 20 additions & 19 deletions

File tree

OneBranchPipelines/build-release-package-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ extends:
201201
parameters:
202202
# Pool Configuration
203203
# Different platforms use different agent pools:
204-
# - Windows: Custom 1ES pool (Django-1ES-pool) with WIN22-SQL22 image (Windows Server 2022 + SQL Server 2022)
205-
# - Linux: Custom 1ES pool (Django-1ES-pool) with ADO-UB22-SQL22 image (Ubuntu 22.04 + SQL Server 2022)
204+
# - Windows: Custom 1ES pool (Python-1ES-pool) with PYTHON-1ES-MMS2022 image (Windows Server 2022 + SQL Server 2022)
205+
# - Linux: Custom 1ES pool (Python-1ES-pool) with PYTHON-1ES-UB2404 image (Ubuntu 24.04 + SQL Server 2022)
206206
# - macOS: Microsoft-hosted pool (Azure Pipelines) with macOS-14 image (macOS Sonoma)
207207
# Note: Container definitions section present but unused (pools configured in individual stage templates)
208208

OneBranchPipelines/dummy-release-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ extends:
9696
pool:
9797
type: windows
9898
isCustom: true
99-
name: Django-1ES-pool
99+
name: Python-1ES-pool
100100
demands:
101-
- imageOverride -equals WIN22-SQL22
101+
- imageOverride -equals PYTHON-1ES-MMS2022
102102

103103
variables:
104104
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'

OneBranchPipelines/official-release-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ extends:
9999
pool:
100100
type: windows
101101
isCustom: true
102-
name: Django-1ES-pool
102+
name: Python-1ES-pool
103103
demands:
104-
- imageOverride -equals WIN22-SQL22
104+
- imageOverride -equals PYTHON-1ES-MMS2022
105105

106106
variables:
107107
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)'

OneBranchPipelines/stages/build-linux-single-stage.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ stages:
3535
pool:
3636
type: linux
3737
isCustom: true
38-
name: Django-1ES-pool
38+
name: Python-1ES-pool
3939
demands:
40-
- imageOverride -equals ADO-UB22-SQL22
40+
- imageOverride -equals PYTHON-1ES-UB2404
4141
# Extended timeout for multi-version builds + testing (5 Python versions × build + test time)
4242
timeoutInMinutes: 120
4343

@@ -65,12 +65,8 @@ stages:
6565
- checkout: self
6666
fetchDepth: 0
6767

68-
# Install Docker
69-
- task: DockerInstaller@0
70-
inputs:
71-
dockerVersion: '20.10.21'
72-
displayName: 'Install Docker'
73-
68+
# Docker is pre-installed now
69+
# Verify it's working and start the daemon
7470
- bash: |
7571
set -e
7672
echo "Verifying we're on Linux..."
@@ -82,9 +78,14 @@ stages:
8278
8379
uname -a
8480
85-
# Start dockerd
86-
sudo dockerd > docker.log 2>&1 &
87-
sleep 10
81+
# Check if Docker daemon is already running
82+
if ! docker info > /dev/null 2>&1; then
83+
echo "Docker daemon not running, starting it..."
84+
sudo dockerd > docker.log 2>&1 &
85+
sleep 10
86+
else
87+
echo "Docker daemon already running"
88+
fi
8889
8990
# Verify Docker works
9091
docker --version

OneBranchPipelines/stages/build-windows-single-stage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ stages:
3838
pool:
3939
type: windows
4040
isCustom: true
41-
name: Django-1ES-pool
41+
name: Python-1ES-pool
4242
demands:
43-
- imageOverride -equals WIN22-SQL22
43+
- imageOverride -equals PYTHON-1ES-MMS2022
4444
# Extended timeout for downloads, builds, and testing
4545
timeoutInMinutes: 120
4646

0 commit comments

Comments
 (0)