From 39c3f650a7a894ee5a8a2ba7708fdb136bc1062c Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 27 Feb 2023 12:26:14 +0800 Subject: [PATCH] [Ci] Support the SONiC reproducible build in Azure Pipelines (#13986) Why I did it [Ci] Support the SONiC reproducible build in Azure Pipelines Enable the reproducible build on master branch Enable the mirror snapshot based build on 202205+ which support snapshot build. How I did it Enable the build flag on Azure Pipelines. How to verify it --- .azure-pipelines/azure-pipelines-repd-build-variables.yml | 4 +--- .azure-pipelines/template-variables.yml | 1 + .github/workflows/label.yml | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-repd-build-variables.yml b/.azure-pipelines/azure-pipelines-repd-build-variables.yml index af77e97e2f..9c742ba19f 100644 --- a/.azure-pipelines/azure-pipelines-repd-build-variables.yml +++ b/.azure-pipelines/azure-pipelines-repd-build-variables.yml @@ -1,7 +1,5 @@ variables: ${{ if eq(variables['Build.Reason'],'PullRequest') }}: 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 }}: - VERSION_CONTROL_OPTIONS: '' + VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker' diff --git a/.azure-pipelines/template-variables.yml b/.azure-pipelines/template-variables.yml index 42d46182d2..9346931968 100644 --- a/.azure-pipelines/template-variables.yml +++ b/.azure-pipelines/template-variables.yml @@ -6,3 +6,4 @@ variables: SONIC_BUILD_RETRY_INTERVAL: 600 DOCKER_BUILDKIT: 0 DOCKER_BUILD_TIMEOUT: 3600 + MIRROR_SNAPSHOT: y diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index b00d618708..04601ca65f 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -12,6 +12,7 @@ on: - opened - reopened branches: + - master - '202012' - '202[1-9][0-9][0-9]' - '20[3-9][0-9][0-9][0-9]'