Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 8 additions & 3 deletions .pipeline/templates/test-matrix-template-alpine.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# filepath: .pipeline/templates/test-matrix-template.yml
# filepath: .pipeline/templates/test-matrix-template-alpine.yml
parameters:
matrix: {}
# Each entry: { name, container, entry }
targets: []
artifactName: 'Build_Linux'
poolName: 'RUST-1ES-POOL-WUS3'
poolImageOverride: 'imageOverride -equals RUST-1ES-UBUSLIM'
Expand All @@ -9,7 +10,11 @@ jobs:
- job: Test_Matrix
displayName: Linux amd64
strategy:
matrix: ${{ parameters.matrix }}
matrix:
${{ each target in parameters.targets }}:
${{ target.name }}:
container: ${{ target.container }}
entry: ${{ target.entry }}
pool:
name: ${{ parameters.poolName }}
demands:
Expand Down
14 changes: 14 additions & 0 deletions .pipeline/templates/test-matrix-template-alpine_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ parameters:
default: 120

jobs:
# ------------------------------------------------------------------
# SHARED MODE: one SQL host + one matrix test job (musl/Alpine).
# NOTE: the steps block below is structurally identical to the
# per-job mode block further down. They differ only in how
# container/entry/sentinel names are sourced: runtime matrix
# variables $(container)/$(entry)/$(sentinelName) here vs.
# compile-time expressions ${{ target.* }} in per-job mode.
# ADO template constraints prevent further factoring. Keep both
# paths in sync when editing steps.
# ------------------------------------------------------------------
- ${{ if eq(parameters.sqlInstanceMode, 'shared') }}:
- template: sql-host-template.yml
parameters:
Expand Down Expand Up @@ -155,6 +165,10 @@ jobs:
artifact: '$(sentinelName)-$(System.StageAttempt)'
publishLocation: 'pipeline'

# ------------------------------------------------------------------
# PER-JOB MODE: one SQL host + one test job per matrix entry (musl).
# NOTE: keep in sync with the shared-mode steps block above.
# ------------------------------------------------------------------
- ${{ if eq(parameters.sqlInstanceMode, 'per-job') }}:
- ${{ each target in parameters.targets }}:
- template: sql-host-template.yml
Expand Down
8 changes: 8 additions & 0 deletions .pipeline/templates/test-matrix-template-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ parameters:
jobs:
# ------------------------------------------------------------------
# SHARED MODE: one SQL host + one matrix test job.
# NOTE: the steps block below is structurally identical to the
# per-job mode block further down. They differ only in how
# container/entry/sentinel names are sourced: runtime matrix
# variables $(container)/$(entry)/$(sentinelName) here vs.
# compile-time expressions ${{ target.* }} in per-job mode.
# ADO template constraints prevent further factoring. Keep both
# paths in sync when editing steps.
# ------------------------------------------------------------------
- ${{ if eq(parameters.sqlInstanceMode, 'shared') }}:
- template: sql-host-template.yml
Expand Down Expand Up @@ -169,6 +176,7 @@ jobs:

# ------------------------------------------------------------------
# PER-JOB MODE: one SQL host + one test job per matrix entry.
# NOTE: keep in sync with the shared-mode steps block above.
# ------------------------------------------------------------------
- ${{ if eq(parameters.sqlInstanceMode, 'per-job') }}:
- ${{ each target in parameters.targets }}:
Expand Down
9 changes: 7 additions & 2 deletions .pipeline/templates/test-matrix-template.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# filepath: .pipeline/templates/test-matrix-template.yml
parameters:
matrix: {}
# Each entry: { name, container, entry }
targets: []

jobs:
- job: Test_Matrix
displayName: Linux amd64
strategy:
matrix: ${{ parameters.matrix }}
matrix:
${{ each target in parameters.targets }}:
${{ target.name }}:
container: ${{ target.container }}
entry: ${{ target.entry }}
pool:
name: RUST-1ES-POOL-WUS3
demands:
Expand Down
64 changes: 15 additions & 49 deletions .pipeline/templates/validation-stages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -498,17 +498,17 @@ stages:
- template: test-matrix-template-alpine.yml
parameters:
artifactName: 'Build_Linux'
matrix:
Alpine3_18:
targets: &alpine_targets
- name: Alpine3_18
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.18
entry: alpine.sh
Alpine3_19:
- name: Alpine3_19
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.19
entry: alpine.sh
Alpine3_20:
- name: Alpine3_20
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.20
entry: alpine.sh
Alpine3_21:
- name: Alpine3_21
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.21
entry: alpine.sh

Expand All @@ -525,19 +525,7 @@ stages:
poolImageOverride: imageOverride -equals RUST-UBUNTU-ARM64
sqlInstanceMode: ${{ parameters.sqlInstanceMode }}
sqlImageTag: ${{ parameters.sqlImageTag }}
targets:
- name: Alpine3_18
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.18
entry: alpine.sh
- name: Alpine3_19
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.19
entry: alpine.sh
- name: Alpine3_20
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.20
entry: alpine.sh
- name: Alpine3_21
container: ghcr.io/microsoft/mssql-rs/import/alpine:3.21
entry: alpine.sh
targets: *alpine_targets

- stage: Test_amd64
dependsOn:
Expand All @@ -547,30 +535,29 @@ stages:
jobs:
- template: test-matrix-template.yml
parameters:
matrix:
DebianBookworm:
targets: &deb_rhel_targets
- name: DebianBookworm
container: ghcr.io/microsoft/mssql-rs/import/debian:bookworm
entry: deb-bookworm.sh
AzLinux3:
- name: AzLinux3
container: mcr.microsoft.com/azurelinux/base/core:3.0
entry: azlinux3.sh
RHEL9:
- name: RHEL9
container: ghcr.io/microsoft/mssql-rs/import/redhat/ubi9:latest
entry: rhel.sh
OracleLinux9:
- name: OracleLinux9
container: ghcr.io/microsoft/mssql-rs/import/oraclelinux:9
entry: rhel.sh
SLES15:
- name: SLES15
container: registry.suse.com/suse/sle15
entry: sles.sh
Ubuntu22:
- name: Ubuntu22
container: ghcr.io/microsoft/mssql-rs/import/ubuntu:22.04
entry: deb-bookworm.sh
Ubuntu24:
- name: Ubuntu24
container: ghcr.io/microsoft/mssql-rs/import/ubuntu:24.04
entry: deb-bookworm.sh


- stage: Test_arm64
dependsOn:
- Build
Expand All @@ -581,28 +568,7 @@ stages:
parameters:
sqlInstanceMode: ${{ parameters.sqlInstanceMode }}
sqlImageTag: ${{ parameters.sqlImageTag }}
targets:
- name: DebianBookworm
container: ghcr.io/microsoft/mssql-rs/import/debian:bookworm
entry: deb-bookworm.sh
- name: AzLinux3
container: mcr.microsoft.com/azurelinux/base/core:3.0
entry: azlinux3.sh
- name: RHEL9
container: ghcr.io/microsoft/mssql-rs/import/redhat/ubi9:latest
entry: rhel.sh
- name: OracleLinux9
container: ghcr.io/microsoft/mssql-rs/import/oraclelinux:9
entry: rhel.sh
- name: SLES15
container: registry.suse.com/suse/sle15
entry: sles.sh
- name: Ubuntu22
container: ghcr.io/microsoft/mssql-rs/import/ubuntu:22.04
entry: deb-bookworm.sh
- name: Ubuntu24
container: ghcr.io/microsoft/mssql-rs/import/ubuntu:24.04
entry: deb-bookworm.sh
targets: *deb_rhel_targets

# Merge the mssql-tds Rust coverage from every OS that runs the tests
# (Build_Windows, Build_Linux, Test_MacOS) and the mssql-py-core coverage from
Expand Down
Loading