Skip to content

Commit 3788f86

Browse files
committed
Fix matrix configuration to use parameters instead of variables
- Changed from runtime variables to compile-time parameters - Matrix now properly expands with parameters.VersionsToTest - Each version spawns as separate parallel job - Fixed replace() to handle both dots and dashes in version strings - Updated documentation comments to reflect parameter-based approach
1 parent 5e18a6c commit 3788f86

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

azure-pipelines-encryption-custom-compatibility.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,25 @@
44
# Matrix Strategy:
55
# ----------------
66
# The pipeline uses a dynamic matrix to test against multiple package versions:
7-
# - PR/CI builds: Test only against BaselineVersion (latest preview)
8-
# - Scheduled/Manual runs: Test against all versions in VersionsToTest
7+
# - PR/CI builds: Test only against BaselineVersion (latest preview) via QuickCheck stage
8+
# - Other builds: Test against all versions in parameters.VersionsToTest via FullMatrix stage
99
#
1010
# Adding New Versions:
1111
# --------------------
1212
# When a new preview or release version is published:
13-
# 1. Update 'BaselineVersion' to the latest version
14-
# 2. Add the new version to 'VersionsToTest' (comma-separated list)
13+
# 1. Update 'BaselineVersion' variable to the latest version
14+
# 2. Add the new version to the 'VersionsToTest' parameter list (in parameters section)
1515
# 3. Optionally remove old versions if the matrix becomes too large
1616
#
17-
# Example:
18-
# BaselineVersion: '1.0.0-preview08'
19-
# VersionsToTest: '1.0.0-preview08,1.0.0-preview07,1.0.0-preview06'
17+
# Example in parameters section:
18+
# - name: VersionsToTest
19+
# type: object
20+
# default:
21+
# - '1.0.0-preview08'
22+
# - '1.0.0-preview07'
23+
# - '1.0.0-preview06'
2024
#
2125
# The matrix will automatically spawn parallel jobs for each version.
22-
#
23-
# For detailed documentation, see: docs/compatibility-testing/MATRIX-CONFIGURATION.md
2426

2527
trigger:
2628
branches:
@@ -53,15 +55,17 @@ variables:
5355

5456
# Baseline version (last published) for PR/CI builds
5557
BaselineVersion: '1.0.0-preview07'
56-
58+
59+
parameters:
5760
# Full version matrix for scheduled/manual runs
5861
# Update this list when new versions are published
59-
# Format: comma-separated version list
60-
${{ if or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')) }}:
61-
VersionsToTest: '1.0.0-preview07,1.0.0-preview06,1.0.0-preview05,1.0.0-preview04'
62-
${{ else }}:
63-
# For PR/CI builds, only test against latest
64-
VersionsToTest: '1.0.0-preview07'
62+
- name: VersionsToTest
63+
type: object
64+
default:
65+
- '1.0.0-preview07'
66+
- '1.0.0-preview06'
67+
- '1.0.0-preview05'
68+
- '1.0.0-preview04'
6569

6670
stages:
6771
# Stage 0: API Compatibility Check (fast fail on breaking changes)
@@ -105,8 +109,8 @@ stages:
105109
vmImage: 'windows-latest'
106110
strategy:
107111
matrix:
108-
${{ each version in split(variables.VersionsToTest, ',') }}:
109-
${{ replace(version, '.', '_') }}:
112+
${{ each version in parameters.VersionsToTest }}:
113+
${{ replace(replace(version, '.', '_'), '-', '_') }}:
110114
TestVersion: ${{ version }}
111115
steps:
112116
- template: templates/encryption-custom-compatibility-test-steps.yml

0 commit comments

Comments
 (0)