forked from Azure/azure-sdk-for-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-orchestrate regression jobs (Azure#23550)
* refactoring test-regression.yml step template to regression.yml, a job template * multiplexing the regression checks by service * allow dynamic generation of service matrix so we never miss anything and also do not execute unnecessary work
- Loading branch information
Showing
6 changed files
with
315 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
parameters: | ||
- name: ServiceDirectory | ||
type: string | ||
default: '' | ||
- name: Matrix | ||
type: string | ||
- name: DependsOn | ||
type: string | ||
default: '' | ||
- name: BuildStagingDirectory | ||
type: string | ||
default: '$(Build.ArtifactStagingDirectory)' | ||
- name: DevFeedName | ||
type: string | ||
default: 'public/azure-sdk-for-python' | ||
- name: UsePlatformContainer | ||
type: boolean | ||
default: false | ||
- name: CloudConfig | ||
type: object | ||
default: {} | ||
- name: TestTimeoutInMinutes | ||
type: number | ||
default: 60 | ||
- name: BuildTargetingString | ||
type: string | ||
default: 'azure-*' | ||
|
||
# The variable $(DependentService) is set from the matrix configuration. | ||
|
||
jobs: | ||
- job: | ||
displayName: 'RegressTest' | ||
condition: | | ||
and( | ||
succeededOrFailed(), | ||
ne(${{ parameters.Matrix }}, '{}'), | ||
or( | ||
eq(variables['Run.Regression'], 'true'), | ||
and( | ||
eq(variables['System.TeamProject'], 'internal'), | ||
eq(variables['Build.Reason'], 'Schedule') | ||
) | ||
) | ||
) | ||
timeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }} | ||
|
||
dependsOn: | ||
- ${{ parameters.DependsOn }} | ||
|
||
strategy: | ||
matrix: $[ ${{ parameters.Matrix }} ] | ||
|
||
pool: | ||
name: $(Pool) | ||
vmImage: $(OSVmImage) | ||
|
||
${{ if eq(parameters.UsePlatformContainer, 'true') }}: | ||
# Add a default so the job doesn't fail when the matrix is empty | ||
container: $[ variables['Container'] ] | ||
|
||
variables: | ||
- template: ../variables/globals.yml | ||
- name: PROXY_URL | ||
value: "http://localhost:5000" | ||
|
||
# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. | ||
steps: | ||
- template: /eng/pipelines/templates/steps/targeting-string-resolve.yml | ||
parameters: | ||
BuildTargetingString: ${{ parameters.BuildTargetingString }} | ||
|
||
- task: UsePythonVersion@0 | ||
displayName: 'Use Python 3.9' | ||
inputs: | ||
versionSpec: '3.9' | ||
|
||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
artifactName: 'packages' | ||
targetPath: $(Build.ArtifactStagingDirectory) | ||
|
||
- script: | | ||
pip install -r eng/regression_tools.txt | ||
displayName: 'Prep Environment' | ||
- template: /eng/common/testproxy/test-proxy-tool.yml | ||
parameters: | ||
runProxy: false | ||
|
||
- template: ../steps/set-dev-build.yml | ||
parameters: | ||
ServiceDirectory: ${{ parameters.ServiceDirectory }} | ||
|
||
- ${{if eq(variables['System.TeamProject'], 'internal') }}: | ||
- template: ../steps/auth-dev-feed.yml | ||
parameters: | ||
DevFeedName: ${{ parameters.DevFeedName }} | ||
|
||
- task: PythonScript@0 | ||
displayName: 'Test Latest Released Dependents' | ||
inputs: | ||
scriptPath: 'scripts/devops_tasks/test_regression.py' | ||
arguments: >- | ||
"$(TargetingString)" | ||
--service="${{ parameters.ServiceDirectory }}" | ||
--dependent-service="$(DependentService)" | ||
--whl-dir="${{ parameters.BuildStagingDirectory }}" | ||
--mark-arg="not cosmosEmulator" | ||
- task: PythonScript@0 | ||
displayName: 'Test Oldest Released Dependents' | ||
inputs: | ||
scriptPath: 'scripts/devops_tasks/test_regression.py' | ||
arguments: >- | ||
"$(TargetingString)" | ||
--service="${{ parameters.ServiceDirectory }}" | ||
--dependent-service="$(DependentService)" | ||
--whl-dir="${{ parameters.BuildStagingDirectory }}" | ||
--verify-latest=False | ||
--mark-arg="not cosmosEmulator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"matrix": { | ||
"Agent": { | ||
"ubuntu-20.04": { | ||
"OSVmImage": "MMSUbuntu20.04", | ||
"Pool": "azsdk-pool-mms-ubuntu-2004-general" | ||
} | ||
}, | ||
"DependentService": [ | ||
"schemaregistry", | ||
"remoterendering", | ||
"eventhub", | ||
"cognitivelanguage", | ||
"tables", | ||
"purview", | ||
"eventgrid", | ||
"confidentialledger", | ||
"mixedreality", | ||
"agrifood", | ||
"monitor", | ||
"attestation", | ||
"digitaltwins", | ||
"synapse", | ||
"servicebus", | ||
"keyvault", | ||
"videoanalyzer", | ||
"communication", | ||
"search", | ||
"cosmos", | ||
"modelsrepository", | ||
"containerregistry", | ||
"identity", | ||
"core", | ||
"template", | ||
"appconfiguration", | ||
"webpubsub", | ||
"textanalytics", | ||
"metricsadvisor", | ||
"storage", | ||
"formrecognizer", | ||
"translation", | ||
"deviceupdate" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.