From 80ae988be412ad31fcc296a9bcc7a4c085d2d574 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Wed, 13 Jul 2022 16:58:37 +0800 Subject: [PATCH] [ci] Enable reproducible build in PR checks. (#11411) * [ci] Enable reproducible build in PR checks. --- .azure-pipelines/azure-pipelines-repd-build-variables.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-repd-build-variables.yml b/.azure-pipelines/azure-pipelines-repd-build-variables.yml index 971722ce57..d86ef1eaf8 100644 --- a/.azure-pipelines/azure-pipelines-repd-build-variables.yml +++ b/.azure-pipelines/azure-pipelines-repd-build-variables.yml @@ -1,5 +1,7 @@ variables: - ${{ if and(ge(variables['Build.SourceBranchName'], '202012'), le(variables['Build.SourceBranchName'], '299999')) }}: - VERSION_CONTROL_OPTIONS: '' - ${{ if or(lt(variables['Build.SourceBranchName'], '202012'), gt(variables['Build.SourceBranchName'], '299999')) }}: + ${{ if eq(variables['Build.Reason'],'PullRequest') }}: + VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=$([ "$(System.PullRequest.TargetBranch)" != "master" ] && echo deb,py2,py3,web,git,docker)' + ${{ elseif ne(variables['Build.SourceBranch'],'master') }}: + VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker' + ${{ else }}: VERSION_CONTROL_OPTIONS: ''