From a9c6578d8d4428eb1099cc3f586467301b66949d Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Fri, 20 Mar 2020 14:46:07 -0700 Subject: [PATCH 1/3] Only run format job in master branch Don't run it in servicing branches, since it depends on an unversions `jitutils` repo. --- eng/pipelines/runtime.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index d259efd65dc8a..a9201e46e118e 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -202,7 +202,7 @@ jobs: # # Build CoreCLR Formatting Job -# Only when CoreCLR is changed +# Only when CoreCLR is changed, and only in the 'master' branch (no release branches). # - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -212,9 +212,11 @@ jobs: - Windows_NT_x64 jobParameters: condition: >- - or( - eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), - eq(variables['isFullMatrix'], true)) + and( + eq(variables['Build.SourceBranch'], 'refs/heads/master'), + or( + eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), + eq(variables['isFullMatrix'], true))) # # Build Mono debug From 77f27273a0e61d0e42be8c80ca7578386783c46c Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Fri, 20 Mar 2020 15:08:24 -0700 Subject: [PATCH 2/3] Run format job on PR builds as well --- eng/pipelines/runtime.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index a9201e46e118e..6f7518585e1f4 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -202,7 +202,8 @@ jobs: # # Build CoreCLR Formatting Job -# Only when CoreCLR is changed, and only in the 'master' branch (no release branches). +# Only when CoreCLR is changed, and only in the 'master' branch (no release branches; +# both CI and PR builds). # - template: /eng/pipelines/common/platform-matrix.yml parameters: @@ -213,7 +214,9 @@ jobs: jobParameters: condition: >- and( - eq(variables['Build.SourceBranch'], 'refs/heads/master'), + or( + eq(variables['Build.SourceBranch'], 'refs/heads/master'), + eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/master')), or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true))) From 1d9a18614baf3f93caed8ee854e0976b538cdc4b Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Fri, 20 Mar 2020 15:13:24 -0700 Subject: [PATCH 3/3] Fix Target check to match reality, not documentation --- eng/pipelines/runtime.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/runtime.yml b/eng/pipelines/runtime.yml index 6f7518585e1f4..8f909825a4311 100644 --- a/eng/pipelines/runtime.yml +++ b/eng/pipelines/runtime.yml @@ -215,8 +215,8 @@ jobs: condition: >- and( or( - eq(variables['Build.SourceBranch'], 'refs/heads/master'), - eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/master')), + eq(variables['Build.SourceBranchName'], 'master'), + eq(variables['System.PullRequest.TargetBranch'], 'master')), or( eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true), eq(variables['isFullMatrix'], true)))