Enable Azure Devops CI leg for PRs


Commit migrated from https://github.com/dotnet/corefx/commit/efc74834dccabb4d1b779a549b942c9d2c0069fa
上级 807339b0
......@@ -2,8 +2,8 @@
trigger: none
# TODO: add paths to exclude CI when modifying docs or stuff not affecting the build
# TODO: enable PR triggers when helix SDK issues are fixed
pr: none
pr:
- master
resources:
containers:
......
......@@ -79,9 +79,6 @@ jobs:
- ${{ if eq(job.submitToHelix, 'true') }}:
- group: DotNet-HelixApi-Access
- ${{ if eq(parameters.isOfficialBuild, 'false') }}:
- HelixApiAccessToken: $(BotAccount-dotnet-github-anon-kaonashi-bot-helix-token)
# Windows variables
- ${{ if eq(parameters.targetOS, 'Windows_NT') }}:
- _buildScript: build.cmd
......@@ -169,18 +166,21 @@ jobs:
helixQueues: $(_helixQueues)
msbuildScript: $(_msbuildCommand)
framework: $(_framework)
helixToken: $(HelixApiAccessToken)
${{ if eq(parameters.isOfficialBuild, 'true') }}:
isExternal: false
waitForCompletion: false
officialBuildId: $(Build.BuildNumber)
helixToken: $(HelixApiAccessToken)
enableAzurePipelinesReporter: true
${{ if eq(parameters.isOfficialBuild, 'false') }}:
# TODO: SET Creator and isExternal: true whenever there is a viable way to get github user
# that created the PR for the test telemetry to have the correct owner.
# creator: $(Build.RequestedFor)
isExternal: false
# TODO: SET Creator to the PR owner whenever Azure DevOps supports a good way to retrieve it.
creator: dotnet-bot
isExternal: true
waitForCompletion: true
helixToken: ''
# TODO: Enable azure pipelines reporter for PRs once retry feature is available.
enableAzurePipelinesReporter: false
- ${{ if eq(parameters.isOfficialBuild, 'true') }}:
- task: PublishBuildArtifacts@1
......
......@@ -10,6 +10,7 @@ parameters:
targetOS: ''
waitForCompletion: '' # true | false
officialBuildId: ''
enableAzurePipelinesReporter: '' # true | false
steps:
- script: ${{ parameters.msbuildScript }}
......@@ -26,7 +27,7 @@ steps:
/p:IsExternal=${{ parameters.isExternal }}
/p:Creator=${{ parameters.creator }}
/p:OfficialBuildId=${{ parameters.officialBuildId }}
/p:EnableAzurePipelinesReporter=true
/p:EnableAzurePipelinesReporter=${{ parameters.enableAzurePipelinesReporter }}
displayName: Send to Helix
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
......@@ -30,6 +30,18 @@
<TestRunNamePrefix>$(BuildConfiguration)-</TestRunNamePrefix>
</PropertyGroup>
<!-- If mission control reports a test failure then fail the build whenever helix wait runs. -->
<PropertyGroup Condition="'$(FailOnMissionControlTestFailure)' == ''">
<FailOnMissionControlTestFailure>true</FailOnMissionControlTestFailure>
<FailOnMissionControlTestFailure Condition="'$(OfficialBuildId)' != ''">false</FailOnMissionControlTestFailure>
</PropertyGroup>
<!-- If mission control reports a test crash (fireball) then fail the build on helix wait -->
<PropertyGroup Condition="'$(FailOnWorkItemFailure)' == ''">
<FailOnWorkItemFailure>true</FailOnWorkItemFailure>
<FailOnWorkItemFailure Condition="'$(OfficialBuildId)' != ''">false</FailOnWorkItemFailure>
</PropertyGroup>
<PropertyGroup Condition="'$(HelixType)' == ''">
<!-- For PRs we want helixtype to be the same for all frameworks -->
<HelixType>test/functional/cli/</HelixType>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册