From 6736ff784b30b9b6d70bc451c6026049044647e7 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Mon, 24 Jun 2019 17:46:59 -0700 Subject: [PATCH 1/6] Some YAML improvements --- azure-pipelines.yml | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5e09eb0f67d..5c6391a9d27 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,16 +14,31 @@ variables: _PublishUsingPipelines: true _DotNetArtifactsCategory: WINDOWSDESKTOP +# Setting batch to true, triggers one build at a time. +# if there is a push while a build in progress, it will wait, +# until the running build finishes, and produce a build with all the changes +# # only trigger ci builds for the master and release branches trigger: -- master -- release/3.0 -- arcade - -# To be added in the future when VSTS supports this feature -# only trigger pull request builds for the master branch -# pr: -# - master + batch: true + branches: + include: + - master + - release/3.0 + # - arcade + paths: + exclude: + -Documentation/* + +pr: + autoCancel: true + branches: + include: + - master + - release/3.0 + paths: + exclude: + - Documentation/* # Call the pipeline.yml template, which does the real work jobs: From 020c89e5e92fcdd1d1f0f20901ae56b7ca331dd6 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Mon, 24 Jun 2019 22:12:27 -0700 Subject: [PATCH 2/6] Add a high-level override to prevent Helix tests from running --- azure-pipelines.yml | 5 +++++ eng/pipeline.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5c6391a9d27..7af253dd027 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,6 +14,11 @@ variables: _PublishUsingPipelines: true _DotNetArtifactsCategory: WINDOWSDESKTOP +# This is set in the pipeline directly +# When set to false, CI tests will not be enabled in builds. +# +# _ContinuousIntegrationTestsEnabled: true + # Setting batch to true, triggers one build at a time. # if there is a push while a build in progress, it will wait, # until the running build finishes, and produce a build with all the changes diff --git a/eng/pipeline.yml b/eng/pipeline.yml index f63502e41f0..1d013cc70a1 100644 --- a/eng/pipeline.yml +++ b/eng/pipeline.yml @@ -157,4 +157,4 @@ jobs: HelixAccessToken: $(_HelixToken) # only defined for internal CI Creator: $(_HelixCreator) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true')) # on helix machine (with real signing) when running on the public build pipeline + condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true'), ne(variables['_ContinuousIntegrationTestsEnabled'], 'false')) # on helix machine (with real signing) when running on the public build pipeline From fd354888539b800749d9af3c81396042fec9b4ae Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Mon, 24 Jun 2019 22:21:05 -0700 Subject: [PATCH 3/6] Fix a space --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7af253dd027..d1344812983 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,7 +33,7 @@ trigger: # - arcade paths: exclude: - -Documentation/* + - Documentation/* pr: autoCancel: true From 728457a249771410524bbbf5e90fe9046761445f Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Mon, 24 Jun 2019 23:10:50 -0700 Subject: [PATCH 4/6] Offload Helix onto a separate pipeline --- azure-pipelines.yml | 2 +- eng/pipeline.yml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d1344812983..1ac44fa05ad 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -17,7 +17,7 @@ variables: # This is set in the pipeline directly # When set to false, CI tests will not be enabled in builds. # -# _ContinuousIntegrationTestsEnabled: true +# _ContinuousIntegrationTestsEnabled: false # Setting batch to true, triggers one build at a time. # if there is a push while a build in progress, it will wait, diff --git a/eng/pipeline.yml b/eng/pipeline.yml index 1d013cc70a1..8eb60684bf1 100644 --- a/eng/pipeline.yml +++ b/eng/pipeline.yml @@ -140,6 +140,8 @@ jobs: $(_OfficialBuildIdArgs) $(_PlatformArgs) displayName: Windows Build / Publish + # This condition should be kept in sync with the condition for 'Run DRTs' step + condition: or(ne(variables['_ContinuousIntegrationTestsOnlyPipeline'], 'true'), and(eq(variables['_ContinuousIntegrationTestsOnlyPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))) # Run DRTs - powershell: eng\common\cibuild.cmd @@ -157,4 +159,5 @@ jobs: HelixAccessToken: $(_HelixToken) # only defined for internal CI Creator: $(_HelixCreator) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true'), ne(variables['_ContinuousIntegrationTestsEnabled'], 'false')) # on helix machine (with real signing) when running on the public build pipeline + # This condition should be kept in sync with the condition for cibuild.cmd step + condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true')) # on helix machine (with real signing) when running on the public build pipeline From 9ceb6eb72306f113e43bbbbb4fff881477c3bbdf Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Fri, 28 Jun 2019 14:30:06 -0700 Subject: [PATCH 5/6] Improve conditions --- eng/pipeline.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/eng/pipeline.yml b/eng/pipeline.yml index 8eb60684bf1..ac26e7ecb8c 100644 --- a/eng/pipeline.yml +++ b/eng/pipeline.yml @@ -50,6 +50,8 @@ jobs: value: x86 - name: _PlatformArgs value: /p:Platform=$(_Platform) + - name: _PublicBuildPipeline # We will run Helix tests when building in the open, but do not repeat when building and publishing again using the internal build-pipeline + value: true - name: _TestHelixAgentPool value: 'Windows.10.Amd64.ClientRS5.Open' # Preferred:'Windows.10.Amd64.Open%3bWindows.7.Amd64.Open%3bWindows.10.Amd64.ClientRS5.Open'; See https://github.com/dotnet/wpf/issues/952 - name: _HelixStagingDir @@ -60,8 +62,7 @@ jobs: value: '' - name: _HelixCreator value: ${{ parameters.repoName }} - - name: _HelixPublicBuildPipeline # Run Helix tests when building in the open, do not repeat when building and publishign again using the internal build-pipeline - value: true + # Override some values if we're building internally - ${{ if eq(parameters.runAsPublic, 'false') }}: @@ -93,6 +94,8 @@ jobs: /p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat) - name: _OfficialBuildIdArgs value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) + - name: _PublicBuildPipeline + value: false - name: _HelixSource value: official/${{ parameters.repoName }}/$(Build.SourceBranch) - name: _HelixToken @@ -101,8 +104,7 @@ jobs: value: '' #if _HelixToken is set, Creator must be empty - name: _TestHelixAgentPool value: 'Windows.10.Amd64.ClientRS5' # Preferred: 'Windows.10.Amd64%3bWindows.7.Amd64%3bWindows.10.Amd64.ClientRS5' - - name: _HelixPublicBuildPipeline - value: false + strategy: matrix: Build_Debug_x86: @@ -141,7 +143,11 @@ jobs: $(_PlatformArgs) displayName: Windows Build / Publish # This condition should be kept in sync with the condition for 'Run DRTs' step - condition: or(ne(variables['_ContinuousIntegrationTestsOnlyPipeline'], 'true'), and(eq(variables['_ContinuousIntegrationTestsOnlyPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))) + # When building on a regular pipeline (!_HelixPipeline), build as usual + # When building on a Helix pipeline, only build Release configs + # (!_HelixPipeline) || + # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release) + condition: or(ne(variables['_HelixPipeline'], 'true'), and(eq(variables['_HelixPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))) # Run DRTs - powershell: eng\common\cibuild.cmd @@ -159,5 +165,10 @@ jobs: HelixAccessToken: $(_HelixToken) # only defined for internal CI Creator: $(_HelixCreator) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - # This condition should be kept in sync with the condition for cibuild.cmd step - condition: and(succeeded(), eq(variables['_BuildConfig'], 'Release'), eq(variables['_HelixPublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true')) # on helix machine (with real signing) when running on the public build pipeline + # This condition should be kept in sync with the condition for cibuild.cmd step with displayName: "Windows Build / Publish" + # Only run ... + # ...When building on a Helix pipeline, only build Release configs + # + # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release) + # + condition: and(succeeded(), eq(variables[_HelixPipeline], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true')) From df315755f28c8c8d5b230ebf5f8ddb421f589ff8 Mon Sep 17 00:00:00 2001 From: Vatsan Madhavan Date: Fri, 28 Jun 2019 15:31:20 -0700 Subject: [PATCH 6/6] Fix quote --- eng/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipeline.yml b/eng/pipeline.yml index ac26e7ecb8c..d69eed437ce 100644 --- a/eng/pipeline.yml +++ b/eng/pipeline.yml @@ -171,4 +171,4 @@ jobs: # # (_HelixPipeline && _PublicBuildPipeline && _ContinuousIntegrationTestsEnabled && _BuildConfig == Release) # - condition: and(succeeded(), eq(variables[_HelixPipeline], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true')) + condition: and(succeeded(), eq(variables['_HelixPipeline'], 'true') ,eq(variables['_BuildConfig'], 'Release'), eq(variables['_PublicBuildPipeline'], 'true'), eq(variables['_ContinuousIntegrationTestsEnabled'], 'true'))