Skip to content

Commit 9542971

Browse files
authored
Add ability to submit helix job from command line (dotnet#20208)
* Add ability to submit helix job from command line Resolves dotnet#19976
1 parent 0e46403 commit 9542971

File tree

5 files changed

+41
-5
lines changed

5 files changed

+41
-5
lines changed

activate.sh

100644100755
File mode changed.

azure-pipelines.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ stages:
177177
artifactType: Container
178178
parallel: true
179179

180-
- job: Helix_Windows
180+
- job: Helix
181181
pool:
182182
${{ if eq(variables['System.TeamProject'], 'public') }}:
183183
name: NetCorePublic-Pool
@@ -191,8 +191,6 @@ stages:
191191
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
192192
- name: HelixTargetQueues
193193
value: Windows.10.Amd64.Open;Ubuntu.1804.Amd64.Open;OSX.1014.Amd64.Open
194-
- name: Creator
195-
value: efcore
196194
- name: _HelixAccessToken
197195
value: '' # Needed for public queues
198196
- ${{ if ne(variables['System.TeamProject'], 'public') }}:

eng/helix.proj

+11-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<HelixType>test/product/</HelixType>
44
<HelixBuild>$(BUILD_BUILDNUMBER)</HelixBuild>
55
<HelixTargetQueues>$(HelixTargetQueues)</HelixTargetQueues>
6-
<Creator>$(Creator)</Creator>
6+
<Creator Condition = "'$(HelixAccessToken)' == ''">efcore</Creator>
77
<HelixAccessToken>$(HelixAccessToken)</HelixAccessToken>
88

99
<IncludeDotNetCli>true</IncludeDotNetCli>
@@ -16,6 +16,15 @@
1616
<FailOnMissionControlTestFailure>true</FailOnMissionControlTestFailure>
1717
</PropertyGroup>
1818

19+
<PropertyGroup Condition = "'$(SYSTEM_ACCESSTOKEN)' == ''">
20+
<!-- Local build outside of Azure Pipeline -->
21+
<HelixTargetQueues Condition = "'$(HelixTargetQueues)' == ''">Windows.10.Amd64.Open;Ubuntu.1804.Amd64.Open;OSX.1014.Amd64.Open</HelixTargetQueues>
22+
<EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
23+
<FailOnMissionControlTestFailure>false</FailOnMissionControlTestFailure>
24+
<HelixSource>efcore/localbuild/</HelixSource>
25+
<HelixBuild>t001</HelixBuild>
26+
</PropertyGroup>
27+
1928
<ItemGroup>
2029
<XUnitProject Include="$(RepoRoot)/test/**/*.csproj"/>
2130
<XUnitProject Remove="$(RepoRoot)/test/EFCore.Specification.Tests/*.csproj"/>
@@ -29,4 +38,4 @@
2938
<XUnitArguments></XUnitArguments>
3039
<XUnitWorkItemTimeout>00:30:00</XUnitWorkItemTimeout>
3140
</PropertyGroup>
32-
</Project>
41+
</Project>

helix.cmd

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@ECHO OFF
2+
3+
:: This command sends helix test job from local machine
4+
5+
SET DOTNET_ROOT=%~dp0.dotnet\
6+
SET BUILD_SOURCEBRANCH="master"
7+
SET BUILD_REPOSITORY_NAME="efcore"
8+
SET SYSTEM_TEAMPROJECT="public"
9+
SET BUILD_REASON="test"
10+
11+
IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
12+
call dotnet msbuild eng\helix.proj /restore /t:Test %*
13+
) ELSE (
14+
call %DOTNET_ROOT%\dotnet.exe msbuild eng\helix.proj /restore /t:Test %*
15+
)

helix.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
# This command sends helix test job from local machine
4+
5+
export BUILD_SOURCEBRANCH="master"
6+
export BUILD_REPOSITORY_NAME="efcore"
7+
export SYSTEM_TEAMPROJECT="public"
8+
export BUILD_REASON="test"
9+
10+
if [[ ! -f ".dotnet/dotnet" ]]; then
11+
dotnet msbuild eng/helix.proj /restore /t:Test "$@"
12+
else
13+
.dotnet/dotnet msbuild eng/helix.proj /restore /t:Test "$@"
14+
fi

0 commit comments

Comments
 (0)