1+ # File: templates/build-preview.yml
2+
3+ parameters :
4+ BuildConfiguration : ' '
5+ Arguments : ' '
6+ VmImage : ' '
7+ OS : ' Windows'
8+
9+ jobs :
10+
11+ - job :
12+ displayName : Preview Flag ${{ parameters.BuildConfiguration }}
13+ pool :
14+ name : ' OneES'
15+
16+ steps :
17+ - checkout : self # self represents the repo where the initial Pipelines YAML file was found
18+ clean : true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
19+
20+ # Add this Command to Include the .NET SDK and runtimes
21+ - task : UseDotNet@2
22+ displayName : Use .NET 6.0
23+ inputs :
24+ packageType : ' runtime'
25+ version : ' 6.x'
26+
27+ - task : UseDotNet@2
28+ displayName : Use .NET 8.0
29+ inputs :
30+ packageType : ' sdk'
31+ version : ' 8.x'
32+
33+ - task : DotNetCoreCLI@2
34+ displayName : Build Microsoft.Azure.Cosmos PREVIEW
35+ inputs :
36+ command : build
37+ configuration : $(parameters.BuildConfiguration)
38+ nugetConfigPath : NuGet.config
39+ projects : Microsoft.Azure.Cosmos.sln
40+ arguments : -p:Optimize=true -p:IsPreview=true
41+ versioningScheme : OFF
42+
43+ - job :
44+ displayName : Encryption.Custom Project Ref SDK Preview ${{ parameters.BuildConfiguration }}
45+ pool :
46+ name : ' OneES'
47+
48+ steps :
49+ - checkout : self # self represents the repo where the initial Pipelines YAML file was found
50+ clean : true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
51+
52+ # Add this Command to Include the .NET 6 SDK
53+ - task : UseDotNet@2
54+ displayName : Use .NET 6.0
55+ inputs :
56+ packageType : ' runtime'
57+ version : ' 6.x'
58+
59+ - task : UseDotNet@2
60+ displayName : Use .NET 8.0
61+ inputs :
62+ packageType : ' sdk'
63+ version : ' 8.x'
64+
65+ - task : DotNetCoreCLI@2
66+ displayName : Build Microsoft.Azure.Cosmos.Encryption.Custom Project Ref
67+ inputs :
68+ command : build
69+ configuration : $(parameters.BuildConfiguration)
70+ nugetConfigPath : NuGet.config
71+ projects : Microsoft.Azure.Cosmos.sln
72+ arguments : -p:Optimize=true -p:IsPreview=true;SdkProjectRef=true
73+ versioningScheme : OFF
74+
75+ - job :
76+ displayName : Preview Tests ${{ parameters.BuildConfiguration }}
77+ pool :
78+ name : ' OneES'
79+
80+ steps :
81+ - checkout : self # self represents the repo where the initial Pipelines YAML file was found
82+ clean : true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
83+
84+ # Add this Command to Include the .NET 6 SDK
85+ - task : UseDotNet@2
86+ displayName : Use .NET 6.0
87+ inputs :
88+ packageType : ' runtime'
89+ version : ' 6.x'
90+
91+ - task : UseDotNet@2
92+ displayName : Use .NET 8.0
93+ inputs :
94+ packageType : ' sdk'
95+ version : ' 8.x'
96+
97+ - task : DotNetCoreCLI@2
98+ displayName : PREVIEW Microsoft.Azure.Cosmos.Tests
99+ condition : succeeded()
100+ inputs :
101+ command : test
102+ projects : ' Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/*.csproj'
103+ arguments : ${{ parameters.Arguments }} --configuration ${{ parameters.BuildConfiguration }} /p:IsPreview=true /p:OS=${{ parameters.OS }}
104+ publishTestResults : true
105+ nugetConfigPath : NuGet.config
106+ testRunTitle : Microsoft.Azure.Cosmos.Tests
107+
108+ - job :
109+ displayName : Preview Tests ${{ parameters.BuildConfiguration }} Flaky
110+ pool :
111+ name : ' OneES'
112+
113+ steps :
114+ - checkout : self # self represents the repo where the initial Pipelines YAML file was found
115+ clean : true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching
116+
117+ # Add this Command to Include the .NET 6 SDK
118+ - task : UseDotNet@2
119+ displayName : Use .NET 6.0
120+ inputs :
121+ packageType : ' runtime'
122+ version : ' 6.x'
123+
124+ - task : UseDotNet@2
125+ displayName : Use .NET 8.0
126+ inputs :
127+ packageType : ' sdk'
128+ version : ' 8.x'
129+
130+ - task : DotNetCoreCLI@2
131+ displayName : PREVIEW Microsoft.Azure.Cosmos.Tests
132+ retryCountOnTaskFailure : 4
133+ condition : succeeded()
134+ inputs :
135+ command : test
136+ projects : ' Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/*.csproj'
137+ arguments : --filter "TestCategory=Flaky" --verbosity normal --configuration ${{ parameters.BuildConfiguration }} /p:IsPreview=true /p:OS=${{ parameters.OS }}
138+ publishTestResults : true
139+ nugetConfigPath : NuGet.config
140+ testRunTitle : Microsoft.Azure.Cosmos.Tests
0 commit comments