Skip to content

Commit 4a79d8b

Browse files
azure-sdkscbedd
andauthored
Sync eng/common directory with azure-sdk-tools for PR 2913 (Azure#20874)
* archetype-sdk-tests-generate.yml now provides an opportunity for additional steps after the target has been cloned but before matrix generation is invoked Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
1 parent a0fbee4 commit 4a79d8b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ parameters:
3636
- name: GenerateJobName
3737
type: string
3838
default: 'generate_job_matrix'
39+
- name: PreGenerationSteps
40+
type: stepList
41+
default: []
3942

4043
jobs:
4144
- job: ${{ parameters.GenerateJobName }}
@@ -58,6 +61,8 @@ jobs:
5861
Paths:
5962
- "sdk/${{ parameters.AdditionalParameters.ServiceDirectory }}"
6063

64+
- ${{ parameters.PreGenerationSteps }}
65+
6166
- ${{ each config in parameters.MatrixConfigs }}:
6267
- ${{ if eq(config.GenerateVMJobs, 'true') }}:
6368
- task: Powershell@2

eng/common/scripts/job-matrix/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ jobs:
5656
Cloud: Public
5757
MatrixFilters: []
5858
MatrixReplace: []
59+
PreGenerationSteps: []
5960
```
6061

62+
### A note regarding PreGenerationSteps
63+
64+
The generation template laid out above runs as its own job. A limitation of this method is that it disallows any runtime matrix customization due to the fact that an individual job clones the targeted build SHA. The stepList `PreGenerationSteps` allows users to update matrix json however they like prior to actually invoking the matrix generation. Injected steps are run after the repository checkout, but before any matrix generation is invoked.
65+
6166
## Matrix config file syntax
6267

6368
Matrix parameters can either be a list of strings, or a set of grouped strings (represented as a hash). The latter parameter

0 commit comments

Comments
 (0)