From fd4bd5b3abf7ffe35abae9ee89a1c52e7445b70e Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Mon, 29 Aug 2022 11:26:15 +0800 Subject: [PATCH] [ci] Update reproducible build related pipeline. (#11810) --- .azure-pipelines/azure-pipelines-repd-build-variables.yml | 2 +- .azure-pipelines/official-build.yml | 2 +- azure-pipelines.yml | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-repd-build-variables.yml b/.azure-pipelines/azure-pipelines-repd-build-variables.yml index 1bd897dafb92..af77e97e2ff0 100644 --- a/.azure-pipelines/azure-pipelines-repd-build-variables.yml +++ b/.azure-pipelines/azure-pipelines-repd-build-variables.yml @@ -1,6 +1,6 @@ variables: ${{ if eq(variables['Build.Reason'],'PullRequest') }}: - VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([ "$(System.PullRequest.TargetBranch)" != "master" ] && echo deb,py2,py3,web,git,docker)' + VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([[ "$(System.PullRequest.TargetBranch)" =~ ^20[2-9][0-9]{3}$ ]] && echo deb,py2,py3,web,git,docker)' ${{ elseif ne(variables['Build.SourceBranchName'],'master') }}: VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker' ${{ else }}: diff --git a/.azure-pipelines/official-build.yml b/.azure-pipelines/official-build.yml index 6a15337e1c5b..f4e669fcb944 100644 --- a/.azure-pipelines/official-build.yml +++ b/.azure-pipelines/official-build.yml @@ -38,7 +38,7 @@ stages: variables: - name: CACHE_MODE value: wcache - - template: azure-pipelines-repd-build-variables.yml + - template: azure-pipelines-repd-build-variables.yml@buildimage jobs: - template: azure-pipelines-build.yml parameters: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 16e01b8ef4cf..a31be020a9a3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,10 +38,7 @@ resources: variables: - template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage -- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - - template: .azure-pipelines/template-variables.yml -- ${{ else }}: - - template: .azure-pipelines/template-variables.yml@buildimage +- template: .azure-pipelines/template-variables.yml@buildimage - name: CACHE_MODE value: rcache