Skip to content
Open
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
6 changes: 4 additions & 2 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ extends:
stages:
- ${{ each package in coalesce(parameters.Packages, split(parameters.BuildTargetingString, '|')) }}:
- ${{ each cloud in parameters.CloudConfig }}:
- ${{ if or(contains(parameters.Clouds, cloud.key), and(contains(variables['Build.DefinitionName'], 'tests-weekly'), contains(parameters.SupportedClouds, cloud.key))) }}:
- ${{ if contains(parameters.Clouds, cloud.key) }}:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12 services set it, but 9 set it to Public (same as the default) — those are unaffected. Only 3 set a non-Public value:

-- | -- | -- | --
Service | Clouds | CloudConfig | Affected?
personalizer | Canary | default (includes Public) | Yes (Can be ignored coz the last run was 2022)
formrecognizer | Prod | custom — only Prod | No
agrifood | Public_FarmBeats | custom — only Public_Farmbeats | No

- ${{ if not(contains(parameters.UnsupportedClouds, cloud.key)) }}:
- stage:
displayName: ${{ format('{0} {1} {2}', cloud.key, parameters.JobName, package) }}
Expand Down Expand Up @@ -168,9 +168,11 @@ extends:
ServiceConnection: ${{ coalesce(cloud.value.ServiceConnection, lower(format('azure-sdk-tests-{0}', cloud.key))) }}
SubscriptionConfigurationFilePaths: ${{ cloud.value.SubscriptionConfigurationFilePaths }}

- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
# Analyze-weekly runs only on scheduled runs that start on a weekend (Sat/Sun, UTC).
- ${{ if eq(variables['Build.Reason'], 'Schedule') }}:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
parameters:
BuildTargetingString: ${{ package }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
JobName: ${{ parameters.JobName }}
Condition: and(succeeded(), in(format('{0:ddd}', pipeline.startTime), 'Sat', 'Sun'))
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ extends:
template: /eng/pipelines/templates/stages/1es-redirect.yml
parameters:
stages:
- ${{ if contains(variables['Build.DefinitionName'], 'tests-weekly') }}:
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
JobName: ${{ parameters.JobName }}
# Analyze-weekly runs only on scheduled runs that start on a weekend (Sat/Sun, UTC).
- template: /eng/pipelines/templates/stages/python-analyze-weekly.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
BuildTargetingString: ${{ parameters.BuildTargetingString }}
JobName: ${{ parameters.JobName }}
Condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule'), in(format('{0:ddd}', pipeline.startTime), 'Sat', 'Sun'))
7 changes: 7 additions & 0 deletions eng/pipelines/templates/stages/python-analyze-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ parameters:
- name: JobName
type: string
default: 'Test'
- name: Condition
type: string
default: succeeded()

stages:
- stage:
displayName: 'Analyze_${{ parameters.JobName }}'
variables:
- template: /eng/pipelines/templates/variables/image.yml
# Signals the analyze-weekly context to the Python tooling (see ci_tools.variables.in_analyze_weekly).
- name: AZURE_SDK_ANALYZE_WEEKLY
value: '1'
dependsOn: []
condition: ${{ parameters.Condition }}
jobs:
- job: 'Analyze'
timeoutInMinutes: 90
Expand Down
6 changes: 5 additions & 1 deletion eng/tools/azure-sdk-tools/ci_tools/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ def in_public() -> int:


def in_analyze_weekly() -> int:
# Returns 4 if the build originates from the tests-weekly analyze job
# Returns 4 if the build originates from the analyze-weekly job
# 0 otherwise
# The analyze-weekly stage sets AZURE_SDK_ANALYZE_WEEKLY=1 (see python-analyze-weekly.yml).
if os.getenv("AZURE_SDK_ANALYZE_WEEKLY", "") == "1":
return 4
# Fallback for pipelines still keyed on the 'tests-weekly' definition name (e.g. identity).
if (
"tests-weekly" in os.getenv("SYSTEM_DEFINITIONNAME", "")
and os.getenv("SYSTEM_STAGEDISPLAYNAME", "") == "Analyze_Test"
Expand Down
Loading