Enable Azure Devops CI leg for PRs
authorSantiago Fernandez Madero <safern@microsoft.com>
Fri, 4 Jan 2019 00:24:27 +0000 (16:24 -0800)
committerSantiago Fernandez Madero <safern@microsoft.com>
Thu, 17 Jan 2019 18:48:18 +0000 (10:48 -0800)
Commit migrated from https://github.com/dotnet/corefx/commit/efc74834dccabb4d1b779a549b942c9d2c0069fa

eng/pipelines/libraries/.azure-ci.yml
eng/pipelines/libraries/corefx-base.yml
eng/pipelines/libraries/helix.yml
eng/sendtohelix.proj

index 141413af6eb9d3aed067409beed251e3cba88548..7f6ff045e4a46654111eb356045fe65c00122de7 100644 (file)
@@ -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:
index 8f2ee2cc6451bb6c62ed04d97c97951e4fef7baa..b57285366afc4cf71817696f1e04ca1022b82afa 100644 (file)
@@ -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
index 055ac0cf10ed36a55214afee6c8b54e371225f5a..7cdabf855a9f261f8630197e04252cb6a6dda8cd 100644 (file)
@@ -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
index ce64bd8baa0bd8704b9eca5c089804610f43ad1b..885a5c033188256c4d5072e0090ecde0b62276be 100644 (file)
     <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>