Skip to content

Commit 2f3fb58

Browse files
minnieliuMinnie Liu
andauthored
[Communication] - Divide live test pipeline for each SDK (#20902)
* Divide live test pipeline * Divide live test pipeline * Fix pipeline * Adding eng pipeline changes * Fix pipeline * Fix ci pipeline * Fix ci pipeline * Fix ci pipeline * Adding separate yaml files * Setting template as absolute path * Fix path * Fix path * Fix path * Fix default value * Revert tests.yml Co-authored-by: Minnie Liu <peiliu@microsoft.com>
1 parent b140b95 commit 2f3fb58

File tree

7 files changed

+83
-6
lines changed

7 files changed

+83
-6
lines changed

eng/pipelines/templates/jobs/live.tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ parameters:
2626
- name: ServiceDirectory
2727
type: string
2828
default: not-specified
29+
- name: Project
30+
type: string
31+
default: '**'
2932
- name: TestSetupSteps
3033
type: stepList
3134
default: []
@@ -112,6 +115,7 @@ jobs:
112115
--logger:"console;verbosity=normal"
113116
/p:SDKType=${{ parameters.SDKType }}
114117
/p:ServiceDirectory=${{ parameters.ServiceDirectory }}
118+
/p:Project=${{ parameters.Project }}
115119
/p:IncludeSrc=false /p:IncludeSamples=false /p:IncludePerf=false /p:IncludeStress=false
116120
/p:BuildInParallel=${{ parameters.BuildInParallel }}
117121
$(AdditionalTestArguments)

eng/pipelines/templates/stages/archetype-sdk-tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ parameters:
3838
- name: ServiceDirectory
3939
type: string
4040
default: not-specified
41+
- name: Project
42+
type: string
43+
default: '**'
4144
- name: TestSetupSteps
4245
type: stepList
4346
default: []
@@ -124,6 +127,7 @@ stages:
124127
Location: ${{ parameters.Location }}
125128
SDKType: ${{ parameters.SDKType }}
126129
ServiceDirectory: ${{ parameters.ServiceDirectory }}
130+
Project: ${{ parameters.Project }}
127131
TestSetupSteps: ${{ parameters.TestSetupSteps }}
128132
MatrixConfigs:
129133
# Enumerate platforms and additional platforms based on supported clouds (sparse platform<-->cloud matrix).

eng/service.proj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<SDKType Condition="'$(SDKType)' == ''">all</SDKType>
44
<ServiceDirectory Condition="'$(ServiceDirectory)' == '' and '$(Scope)' != ''">$(Scope)</ServiceDirectory>
55
<ServiceDirectory Condition="'$(ServiceDirectory)' == ''">*</ServiceDirectory>
6+
<Project Condition="'$(Project)' == ''">**</Project>
67
<IncludeTests Condition="'$(IncludeTests)' == ''">true</IncludeTests>
78
<IncludeSrc Condition="'$(IncludeSrc)' == ''">true</IncludeSrc>
89
<IncludeSamples Condition="'$(IncludeSamples)' == ''">true</IncludeSamples>
@@ -14,12 +15,12 @@
1415

1516
<ItemGroup>
1617
<MgmtExcludePaths Include="$(MSBuildThisFileDirectory)..\sdk\*\Microsoft.*.Management.*\**\*.csproj;$(MSBuildThisFileDirectory)..\sdk\*mgmt*\**\*.csproj" />
17-
<TestProjects Include="..\sdk\$(ServiceDirectory)\**\tests\**\*.csproj" />
18-
<SamplesProjects Include="..\sdk\$(ServiceDirectory)\**\samples\**\*.csproj" />
19-
<PerfProjects Include="..\sdk\$(ServiceDirectory)\**\perf\**\*.csproj" />
20-
<StressProjects Include="..\sdk\$(ServiceDirectory)\**\stress\**\*.csproj" />
18+
<TestProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\tests\**\*.csproj" />
19+
<SamplesProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\samples\**\*.csproj" />
20+
<PerfProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\perf\**\*.csproj" />
21+
<StressProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\stress\**\*.csproj" />
2122
<SampleApplications Include="..\samples\**\*.csproj" />
22-
<SrcProjects Include="..\sdk\$(ServiceDirectory)\**\*.csproj" Exclude="@(TestProjects);@(SamplesProjects)"/>
23+
<SrcProjects Include="..\sdk\$(ServiceDirectory)\$(Project)\*.csproj" Exclude="@(TestProjects);@(SamplesProjects)"/>
2324
<ProjectReference Include="@(TestProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeTests)' == 'true'" />
2425
<ProjectReference Include="@(SamplesProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludeSamples)' == 'true'" />
2526
<ProjectReference Include="@(PerfProjects)" Exclude="@(MgmtExcludePaths)" Condition="'$(IncludePerf)' == 'true'" />
@@ -39,7 +40,7 @@
3940
<Target Name="CheckProjects" AfterTargets="Build">
4041
<!-- If scope is set this likely came from a call to build.proj and in cases where there is only mgmt projects we don't want to error so skip this extra check -->
4142
<Error Condition="'$(Scope)' == '' and '@(ProjectReference)' == ''"
42-
Text="No Projects found with patttern [..\sdk\$(ServiceDirectory)\**\*.csproj], please make sure you have passed in the correct ServiceDirectory." />
43+
Text="No Projects found with patttern [..\sdk\$(ServiceDirectory)\$(Project)\*.csproj], please make sure you have passed in the correct ServiceDirectory." />
4344
</Target>
4445

4546
<Target Name="GenerateCode">
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
trigger: none
2+
3+
extends:
4+
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
5+
parameters:
6+
ServiceDirectory: communication
7+
Project: Azure.Communication.Chat
8+
CloudConfig:
9+
Public:
10+
SubscriptionConfigurations:
11+
- $(sub-config-azure-cloud-test-resources)
12+
- $(sub-config-communication-services-cloud-test-resources-common)
13+
- $(sub-config-communication-services-cloud-test-resources-net)
14+
Clouds: Public
15+
EnvVars:
16+
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
17+
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
trigger: none
2+
3+
extends:
4+
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
5+
parameters:
6+
ServiceDirectory: communication
7+
Project: Azure.Communication.Identity
8+
CloudConfig:
9+
Public:
10+
SubscriptionConfigurations:
11+
- $(sub-config-azure-cloud-test-resources)
12+
- $(sub-config-communication-services-cloud-test-resources-common)
13+
- $(sub-config-communication-services-cloud-test-resources-net)
14+
Clouds: Public
15+
EnvVars:
16+
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
17+
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
trigger: none
2+
3+
extends:
4+
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
5+
parameters:
6+
ServiceDirectory: communication
7+
Project: Azure.Communication.PhoneNumbers
8+
CloudConfig:
9+
Public:
10+
SubscriptionConfigurations:
11+
- $(sub-config-azure-cloud-test-resources)
12+
- $(sub-config-communication-services-cloud-test-resources-common)
13+
- $(sub-config-communication-services-cloud-test-resources-net)
14+
Clouds: Public
15+
EnvVars:
16+
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
17+
SKIP_PHONENUMBER_LIVE_TESTS: TRUE
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
trigger: none
2+
3+
extends:
4+
template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
5+
parameters:
6+
ServiceDirectory: communication
7+
Project: Azure.Communication.Sms
8+
CloudConfig:
9+
Public:
10+
SubscriptionConfigurations:
11+
- $(sub-config-azure-cloud-test-resources)
12+
- $(sub-config-communication-services-cloud-test-resources-common)
13+
- $(sub-config-communication-services-cloud-test-resources-net)
14+
Clouds: Public
15+
EnvVars:
16+
# SKIP_PHONENUMBER_LIVE_TESTS skips certain phone number tests such as purchase and release
17+
SKIP_PHONENUMBER_LIVE_TESTS: TRUE

0 commit comments

Comments
 (0)