From e0a140efa0c34020bfc76003cdd0331dd614db73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vysok=C3=BD?= Date: Fri, 15 Mar 2024 14:55:27 +0100 Subject: [PATCH] [release/8.0.1xx] Add PR version of VMR pipelines (#19064) --- eng/pipelines/vmr-build-pr.yml | 56 ++++++++++++++++++++ src/SourceBuild/content/eng/pipelines/pr.yml | 18 +++++++ 2 files changed, 74 insertions(+) create mode 100644 eng/pipelines/vmr-build-pr.yml create mode 100644 src/SourceBuild/content/eng/pipelines/pr.yml diff --git a/eng/pipelines/vmr-build-pr.yml b/eng/pipelines/vmr-build-pr.yml new file mode 100644 index 000000000..3c51dfe6e --- /dev/null +++ b/eng/pipelines/vmr-build-pr.yml @@ -0,0 +1,56 @@ +# This is the non-1ES PR pipeline source-building the VMR used in installer PRs +# https://dev.azure.com/dnceng-public/public/_build?definitionId=233 + +trigger: none +pr: + branches: + include: + - main + - release/* + +parameters: +- name: vmrBranch + displayName: dotnet/dotnet branch to push to + type: string + default: ' ' + +- name: disableVmrBuild + displayName: Skip source-building the VMR + type: boolean + default: false + +variables: +- ${{ if ne(parameters.vmrBranch, ' ') }}: + - name: VmrBranch + value: ${{ replace(parameters.vmrBranch, ' ', '') }} +- ${{ else }}: + - name: VmrBranch + value: release/8.0.1xx + +resources: + repositories: + - repository: vmr + type: github + name: dotnet/dotnet + endpoint: dotnet + ref: $(VmrBranch) + +stages: +# You can temporarily disable the VMR Build stage by setting the disableVmrBuild variable +- ${{ if not(parameters.disableVmrBuild) }}: + - template: templates/stages/vmr-build.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + isBuiltFromVmr: false + +# In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate +# that the PR can be merged and later synchronized into the VMR without problems. +- ${{ else }}: + - stage: Synchronize_VMR + displayName: Synchronize VMR + dependsOn: [] + jobs: + - template: templates/jobs/vmr-synchronization.yml + parameters: + vmrBranch: ${{ variables.VmrBranch }} + noPush: true diff --git a/src/SourceBuild/content/eng/pipelines/pr.yml b/src/SourceBuild/content/eng/pipelines/pr.yml new file mode 100644 index 000000000..dcebbcf54 --- /dev/null +++ b/src/SourceBuild/content/eng/pipelines/pr.yml @@ -0,0 +1,18 @@ +# This is the non-1ES PR pipeline for dotnet/dotnet +# https://dev.azure.com/dnceng-public/public/_build?definitionId=240 + +trigger: none +pr: + branches: + include: + - main + - release/* + - internal/release/* + +stages: +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: + - template: templates/stages/vmr-scan.yml + +- template: /src/installer/eng/pipelines/templates/stages/vmr-build.yml + parameters: + isBuiltFromVmr: true