File tree Expand file tree Collapse file tree 5 files changed +32
-25
lines changed
eng/common/core-templates/jobs
Microsoft.DotNet.Arcade.Sdk/tools/Microsoft.Testing.Platform
Microsoft.DotNet.Build.Tasks.Feed/src Expand file tree Collapse file tree 5 files changed +32
-25
lines changed Original file line number Diff line number Diff line change 83
83
- template : /eng/common/core-templates/jobs/source-build.yml
84
84
parameters :
85
85
is1ESPipeline : ${{ parameters.is1ESPipeline }}
86
- allCompletedJobId : Source_Build_Complete
87
86
${{ each parameter in parameters.sourceBuildParameters }} :
88
87
${{ parameter.key }} : ${{ parameter.value }}
89
88
@@ -108,8 +107,6 @@ jobs:
108
107
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }} :
109
108
- ${{ each job in parameters.jobs }} :
110
109
- ${{ job.job }}
111
- - ${{ if eq(parameters.enableSourceBuild, true) }} :
112
- - Source_Build_Complete
113
110
114
111
runAsPublic : ${{ parameters.runAsPublic }}
115
112
publishAssetsImmediately : ${{ or(parameters.publishAssetsImmediately, parameters.isAssetlessBuild) }}
Original file line number Diff line number Diff line change @@ -2,12 +2,6 @@ parameters:
2
2
# This template adds arcade-powered source-build to CI. A job is created for each platform, as
3
3
# well as an optional server job that completes when all platform jobs complete.
4
4
5
- # The name of the "join" job for all source-build platforms. If set to empty string, the job is
6
- # not included. Existing repo pipelines can use this job depend on all source-build jobs
7
- # completing without maintaining a separate list of every single job ID: just depend on this one
8
- # server job. By default, not included. Recommended name if used: 'Source_Build_Complete'.
9
- allCompletedJobId : ' '
10
-
11
5
# See /eng/common/core-templates/job/source-build.yml
12
6
jobNamePrefix : ' Source_Build'
13
7
@@ -31,16 +25,6 @@ parameters:
31
25
32
26
jobs :
33
27
34
- - ${{ if ne(parameters.allCompletedJobId, '') }} :
35
- - job : ${{ parameters.allCompletedJobId }}
36
- displayName : Source-Build Complete
37
- pool : server
38
- dependsOn :
39
- - ${{ each platform in parameters.platforms }} :
40
- - ${{ parameters.jobNamePrefix }}_${{ platform.name }}
41
- - ${{ if eq(length(parameters.platforms), 0) }} :
42
- - ${{ parameters.jobNamePrefix }}_${{ parameters.defaultManagedPlatform.name }}
43
-
44
28
- ${{ each platform in parameters.platforms }} :
45
29
- template : /eng/common/core-templates/job/source-build.yml
46
30
parameters :
Original file line number Diff line number Diff line change 6
6
<_TestEnvironment >%(TestToRun.EnvironmentDisplay)</_TestEnvironment >
7
7
<_TestAssembly >%(TestToRun.Identity)</_TestAssembly >
8
8
<_TestRunner >%(TestToRun.RunCommand)</_TestRunner >
9
+ <_RunArguments >%(TestToRun.RunArguments)</_RunArguments >
9
10
<_TestRuntime >%(TestToRun.TestRuntime)</_TestRuntime >
10
11
<_TestTimeout >%(TestToRun.TestTimeout)</_TestTimeout >
11
- <_TestRunnerAdditionalArguments >$(TestToRun.RunArguments) %(TestToRun.TestRunnerAdditionalArguments)</_TestRunnerAdditionalArguments >
12
+ <_TestRunnerAdditionalArguments >%(TestToRun.TestRunnerAdditionalArguments)</_TestRunnerAdditionalArguments >
13
+ <_TestRunnerAdditionalArguments >$(_RunArguments) $(_TestRunnerAdditionalArguments)</_TestRunnerAdditionalArguments >
12
14
13
15
<_TestResultDirectory >$([System.IO.Path]::GetDirectoryName('%(TestToRun.ResultsTrxPath)'))</_TestResultDirectory >
14
16
<_TestResultTrxFileName >$([System.IO.Path]::GetFileName('%(TestToRun.ResultsTrxPath)'))</_TestResultTrxFileName >
15
- <_TestRunnerArgs >"$(_TestRunner)" $(_TestRunnerAdditionalArguments) --no-progress --report-trx --report-trx-filename "$(_TestResultTrxFileName)" --results-directory "$(_TestResultDirectory)"</_TestRunnerArgs >
17
+ <_TestRunnerArgs >$(_TestRunnerAdditionalArguments) --no-progress --report-trx --report-trx-filename "$(_TestResultTrxFileName)" --results-directory "$(_TestResultDirectory)"</_TestRunnerArgs >
16
18
</PropertyGroup >
17
19
18
20
<!-- Validate that non-Core workloads use executable files, not DLL files -->
Original file line number Diff line number Diff line change @@ -546,8 +546,32 @@ private void LookupForMatchingGitHubRepository(BuildIdentity buildIdentity)
546
546
client . BaseAddress = new Uri ( $ "https://api.{ gitHubHost } ") ;
547
547
client . DefaultRequestHeaders . Add ( "User-Agent" , "PushToBarTask" ) ;
548
548
549
- HttpResponseMessage response =
550
- client . GetAsync ( $ "/repos/{ repoIdentity } /commits/{ buildIdentity . Commit } ") . Result ;
549
+ string url = $ "/repos/{ repoIdentity } /commits/{ buildIdentity . Commit } ";
550
+ HttpResponseMessage response = client . GetAsync ( url ) . Result ;
551
+
552
+ const int MaxRetries = 5 ;
553
+ for ( int retry = 1 ; retry <= MaxRetries && response . StatusCode == System . Net . HttpStatusCode . TooManyRequests ; retry ++ )
554
+ {
555
+ TimeSpan timeSpan ;
556
+ if ( response . Headers . RetryAfter ? . Delta != null )
557
+ {
558
+ timeSpan = response . Headers . RetryAfter . Delta . Value ;
559
+ }
560
+ else if ( response . Headers . RetryAfter ? . Date != null )
561
+ {
562
+ timeSpan = response . Headers . RetryAfter . Date . Value - DateTimeOffset . UtcNow ;
563
+ }
564
+ else
565
+ {
566
+ const int defaultRetryAfterSeconds = 10 ;
567
+ timeSpan = TimeSpan . FromSeconds ( defaultRetryAfterSeconds ) ;
568
+ }
569
+
570
+ Log . LogMessage ( MessageImportance . High ,
571
+ $ "API rate limit exceeded, retrying in { timeSpan . TotalSeconds } seconds. Retry attempt: { retry } ") ;
572
+ Thread . Sleep ( timeSpan ) ;
573
+ response = client . GetAsync ( url ) . Result ;
574
+ }
551
575
552
576
if ( response . IsSuccessStatusCode )
553
577
{
Original file line number Diff line number Diff line change 1
1
{
2
2
"repositories" : [
3
3
{
4
- "barId" : 276435 ,
4
+ "barId" : 276631 ,
5
5
"path" : " arcade" ,
6
6
"remoteUri" : " https://github.com/dotnet/arcade" ,
7
- "commitSha" : " 2586309f3f8553152e2d1d54612e9199975f9cd4 "
7
+ "commitSha" : " 0fbc9e8711fa91e68c2bf3db376fb83b46f4ac35 "
8
8
},
9
9
{
10
10
"barId" : 276610 ,
You can’t perform that action at this time.
0 commit comments