@@ -24,6 +24,7 @@ resources:
2424 type : github
2525 name : Azure/azure-sdk-for-net
2626 endpoint : azure
27+ ref : main
2728 - repository : azure-sdk-build-tools
2829 type : git
2930 name : internal/azure-sdk-build-tools
@@ -39,7 +40,9 @@ stages:
3940 vmImage : windows-2022
4041 steps :
4142 - checkout : self
43+ fetchDepth : 1
4244 - checkout : azure-sdk-tools
45+ fetchDepth : 1
4346 - task : UseDotNet@2
4447 displayName : ' Use .NET Core SDK'
4548 retryCountOnTaskFailure : 3
@@ -163,34 +166,83 @@ stages:
163166 - Build_and_Test
164167 - Release
165168 jobs :
166- - job : Update
167- timeoutInMinutes : 180
168- pool :
169- vmImage : ubuntu-20.04
169+ - template : update-generator-versions.yml
170+ # update codes
171+ - template : update-azure-sdk-for-net-codes.yml
172+ parameters :
173+ name : Update_Codes_A_C
174+ filter : " a*,b*,c*"
175+ - template : update-azure-sdk-for-net-codes.yml
176+ parameters :
177+ name : Update_Codes_D_E
178+ filter : " d*,e*"
179+ - template : update-azure-sdk-for-net-codes.yml
180+ parameters :
181+ name : Update_Codes_F_L
182+ filter : " f*,g*,h*,i*,j*,k*,l*"
183+ - template : update-azure-sdk-for-net-codes.yml
184+ parameters :
185+ name : Update_Codes_M_O
186+ filter : " m*,n*,o*"
187+ - template : update-azure-sdk-for-net-codes.yml
188+ parameters :
189+ name : Update_Codes_P_R
190+ filter : " p*,q*,r*"
191+ - template : update-azure-sdk-for-net-codes.yml
192+ parameters :
193+ name : Update_Codes_S_U
194+ filter : " s*,t*,u*"
195+ - template : update-azure-sdk-for-net-codes.yml
196+ parameters :
197+ name : Update_Codes_V_Z
198+ filter : " v*,w*,x*,y*,z*"
199+ # update samples
200+ - template : update-azure-sdk-for-net-samples.yml
201+ parameters :
202+ name : Update_Samples_A_F
203+ filter : " a*,b*,c*,d*,e*,f*"
204+ - template : update-azure-sdk-for-net-samples.yml
205+ parameters :
206+ name : Update_Samples_G_L
207+ filter : " g*,h*,i*,j*,k*,l*"
208+ - template : update-azure-sdk-for-net-samples.yml
209+ parameters :
210+ name : Update_Samples_M_R
211+ filter : " m*,n*,o*,p*,q*,r*"
212+ - template : update-azure-sdk-for-net-samples.yml
213+ parameters :
214+ name : Update_Samples_S_Z
215+ filter : " s*,t*,u*,v*,w*,x*,y*,z*"
216+ - job : Create_PR
217+ dependsOn :
218+ - Update_Codes_A_C
219+ - Update_Codes_D_E
220+ - Update_Codes_F_L
221+ - Update_Codes_M_O
222+ - Update_Codes_P_R
223+ - Update_Codes_S_U
224+ - Update_Codes_V_Z
225+ - Update_Samples_A_F
226+ - Update_Samples_G_L
227+ - Update_Samples_M_R
228+ - Update_Samples_S_Z
170229 variables :
171230 AutorestCSharpVersion : $[stageDependencies.Build_and_Test.Build.outputs['Package.AutorestCSharpVersion']]
172231 CadlEmitterVersion : $[stageDependencies.Build_and_Test.Build.outputs['Publish.CadlEmitterVersion']]
173232 steps :
174233 - checkout : self
175- - checkout : azure-sdk-for-net
176234 - checkout : azure-sdk-tools
177- - task : UseDotNet @2
178- displayName : ' Use .NET Core SDK '
235+ - task : PowerShell @2
236+ displayName : Create pull request
179237 inputs :
180- useGlobalJson : true
181- performMultiLevelLookup : true
182- - pwsh : ./eng/UpdateAzureSdkForNet.ps1 -AutorestCSharpVersion $(AutorestCSharpVersion) -CadlEmitterVersion $(CadlEmitterVersion) -SdkRepoRoot $(Build.SourcesDirectory)/azure-sdk-for-net
183- failOnStderr : false
184- workingDirectory : $(Build.SourcesDirectory)/autorest.csharp
185- displayName : ' Update generator version in Azure SDK repo'
186- - template : /eng/common/pipelines/templates/steps/create-pull-request.yml@azure-sdk-tools
187- parameters :
188- BaseBranchName : main
189- RepoName : azure-sdk-for-net
190- PRBranchName : auto-update-autorest
191- CommitMsg : Update AutoRest C# version to $(AutorestCSharpVersion)
192- PRBody : Update AutoRest C# version to $(AutorestCSharpVersion)
193- PRTitle : Update AutoRest C# version
194- PushArgs : -f
195- WorkingDirectory : $(Build.SourcesDirectory)/azure-sdk-for-net
196- ScriptDirectory : $(Build.SourcesDirectory)/azure-sdk-tools/eng/common/scripts
238+ pwsh : true
239+ filePath : $(Build.SourcesDirectory)/azure-sdk-tools/eng/common/scripts/Submit-PullRequest.ps1
240+ arguments : >
241+ -RepoOwner "Azure"
242+ -RepoName "azure-sdk-for-net"
243+ -BaseBranch "main"
244+ -PROwner "azure-sdk"
245+ -PRBranch "auto-update-autorest-$(AutorestCSharpVersion)"
246+ -AuthToken "$(azuresdk-github-pat)"
247+ -PRTitle "Update AutoRest C# version to $(AutorestCSharpVersion)"
248+ -PRBody "Update AutoRest C# version to $(AutorestCSharpVersion)"
0 commit comments