Skip to content

Commit 853d8f0

Browse files
authored
Use dotnet-helixapi-access token for internal helix builds
1 parent abfd519 commit 853d8f0

File tree

7 files changed

+28
-10
lines changed

7 files changed

+28
-10
lines changed

.azure/pipelines/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ variables:
3838
value: ''
3939
- name: _SignType
4040
value: ''
41+
- name: _UseHelixOpenQueues
42+
value: 'true'
4143
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
44+
- group: DotNet-HelixApi-Access
45+
- name: _UseHelixOpenQueues
46+
value: 'false'
4247
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
4348
# DotNet-Blob-Feed provides: dotnetfeed-storage-access-key-1
4449
# Publish-Build-Assets provides: MaestroAccessToken, BotAccount-dotnet-maestro-bot-PAT
@@ -582,6 +587,7 @@ stages:
582587
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsRequiredCheck=true /p:IsHelixJob=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
583588
displayName: Run build.cmd helix target
584589
env:
590+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
585591
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
586592
artifacts:
587593
- name: Helix_logs
@@ -602,6 +608,7 @@ stages:
602608
- script: .\build.cmd -ci -NoRestore -test -projects eng\helix\helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
603609
displayName: Run build.cmd helix target
604610
env:
611+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
605612
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
606613
artifacts:
607614
- name: Helix_logs
@@ -623,6 +630,7 @@ stages:
623630
- script: ./build.sh -ci --arch arm64 -test --no-build-nodejs -projects $(Build.SourcesDirectory)/eng/helix/helix.proj /p:IsHelixJob=true /p:IsHelixDaily=true /p:BuildAllProjects=true /p:BuildNative=true /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log -bl
624631
displayName: Run build.sh helix arm64 target
625632
env:
633+
HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues
626634
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
627635
installNodeJs: false
628636
artifacts:

eng/helix/helix.proj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
<Import Project="..\Build.props" />
1313

1414
<ItemGroup>
15-
<HelixTargetQueue Include="@(HelixAvailableTargetQueue)" />
15+
<HelixTargetQueue Condition="'$(_UseHelixOpenQueues)' == 'true'" Include="@(HelixAvailableTargetQueue)" />
16+
<HelixTargetQueue Condition="'$(_UseHelixOpenQueues)' != 'true'" Include="@(HelixAvailableTargetQueue->'%(Identity)'->Replace('.Open',''))" />
1617
</ItemGroup>
1718

1819
<PropertyGroup>
@@ -21,11 +22,13 @@
2122
<IsExternal>true</IsExternal>
2223
<SkipInvalidConfigurations>true</SkipInvalidConfigurations>
2324
<MaxRetryCount Condition="'$(MaxRetryCount)' == ''">2</MaxRetryCount>
25+
<HelixAccessToken Condition="'$(_UseHelixOpenQueues)' != 'true'">$(HelixApiAccessToken)</HelixAccessToken>
2426
</PropertyGroup>
2527

2628
<PropertyGroup Condition=" '$(ContinuousIntegrationBuild)' == 'true' ">
2729
<HelixType>ci</HelixType>
28-
<Creator>aspnetcore</Creator>
30+
<!-- Creator is not valid for internal queues -->
31+
<Creator Condition="'$(_UseHelixOpenQueues)' == 'true'">aspnetcore</Creator>
2932
<HelixBuild>$(BUILD_BUILDNUMBER).$(TargetArchitecture).$(SYSTEM_JOBATTEMPT)</HelixBuild>
3033
<WaitForWorkItemCompletion>true</WaitForWorkItemCompletion>
3134
<EnableAzurePipelinesReporter>true</EnableAzurePipelinesReporter>
@@ -34,8 +37,9 @@
3437

3538
<PropertyGroup Condition=" '$(ContinuousIntegrationBuild)' != 'true' ">
3639
<HelixType>dev</HelixType>
37-
<Creator>$(USERNAME)</Creator>
38-
<Creator Condition="'$(USERNAME)' == ''">$(USER)</Creator>
40+
<!-- Creator is not valid for internal queues -->
41+
<Creator Condition="'$(_UseHelixOpenQueues)' == 'true'">$(USERNAME)</Creator>
42+
<Creator Condition="'$(USERNAME)' == '' AND '$(_UseHelixOpenQueues)' == 'true'">$(USER)</Creator>
3943
<HelixBuild>$([System.DateTime]::Now.ToString('yyyyMMddHHmm'))</HelixBuild>
4044
</PropertyGroup>
4145

eng/targets/Helix.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ Usage: dotnet msbuild /t:Helix src/MyTestProject.csproj
4040
<_SelectedPlatforms>@(HelixProjectPlatform)</_SelectedPlatforms>
4141
</PropertyGroup>
4242

43+
<ItemGroup Condition="'$(_UseHelixOpenQueues)' != 'true'">
44+
<_Temp Include="@(HelixAvailableTargetQueue)" />
45+
<HelixAvailableTargetQueue Remove="@(HelixAvailableTargetQueue)" />
46+
<HelixAvailableTargetQueue Include="@(_Temp->'%(Identity)'->Replace('.Open',''))" />
47+
</ItemGroup>
48+
4349
<ItemGroup>
4450
<!-- Include default queues based on platform -->
4551
<_HelixProjectTargetQueue Include="%(HelixAvailableTargetQueue.Identity)" Condition="'%(HelixAvailableTargetQueue.Identity)' != '' AND '$(_SelectedPlatforms.Contains(%(Platform)))' == 'true'" />

src/Servers/Kestrel/test/FunctionalTests/Http2/HandshakeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void TlsAndHttp2NotSupportedOnWin7()
8080

8181
[ConditionalFact]
8282
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
83-
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
83+
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64;Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
8484
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81)]
8585
public async Task TlsAlpnHandshakeSelectsHttp2From1and2()
8686
{
@@ -111,7 +111,7 @@ public async Task TlsAlpnHandshakeSelectsHttp2From1and2()
111111

112112
[ConditionalFact]
113113
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
114-
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
114+
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64;Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
115115
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81)]
116116
public async Task TlsAlpnHandshakeSelectsHttp2()
117117
{

src/Servers/Kestrel/test/FunctionalTests/Http2/ShutdownTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.FunctionalTests.Http2
2323
{
2424
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
2525
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10)]
26-
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
26+
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64;Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
2727
public class ShutdownTests : TestApplicationErrorLoggerLoggedTest
2828
{
2929
private static X509Certificate2 _x509Certificate2 = TestResources.GetTestCertificate();
@@ -44,7 +44,7 @@ public ShutdownTests()
4444

4545
[CollectDump]
4646
[ConditionalFact]
47-
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/9985", Queues = "Fedora.28.Amd64.Open")]
47+
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/9985", Queues = "Fedora.28.Amd64;Fedora.28.Amd64.Open")]
4848
[Flaky("https://github.com/dotnet/aspnetcore/issues/9985", FlakyOn.All)]
4949
public async Task GracefulShutdownWaitsForRequestsToFinish()
5050
{

src/Servers/Kestrel/test/InMemory.FunctionalTests/HttpsConnectionMiddlewareTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ public void ThrowsForCertificatesMissingServerEku(string testCertName)
595595
[InlineData(HttpProtocols.Http2)]
596596
[InlineData(HttpProtocols.Http1AndHttp2)]
597597
[OSSkipCondition(OperatingSystems.MacOSX, SkipReason = "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492")]
598-
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
598+
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10428", Queues = "Debian.8.Amd64;Debian.8.Amd64.Open")] // Debian 8 uses OpenSSL 1.0.1 which does not support HTTP/2
599599
[MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win81)]
600600
public async Task ListenOptionsProtolsCanBeSetAfterUseHttps(HttpProtocols httpProtocols)
601601
{

src/Servers/Kestrel/test/Interop.FunctionalTests/Utilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal static bool CurrentPlatformSupportsAlpn()
1414
// "Missing SslStream ALPN support: https://github.com/dotnet/corefx/issues/30492"
1515
&& new OSSkipConditionAttribute(OperatingSystems.MacOSX).IsMet
1616
// Debian 8 uses OpenSSL 1.0.1 which does not support ALPN
17-
&& new SkipOnHelixAttribute("https://github.com/dotnet/aspnetcore/issues/10428") { Queues = "Debian.8.Amd64.Open" }.IsMet;
17+
&& new SkipOnHelixAttribute("https://github.com/dotnet/aspnetcore/issues/10428") { Queues = "Debian.8.Amd64;Debian.8.Amd64.Open" }.IsMet;
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)