[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
This commit is contained in:
xumia 2023-02-27 12:26:14 +08:00 committed by GitHub
parent 58592e6c49
commit 39c3f650a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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'

View File

@ -6,3 +6,4 @@ variables:
SONIC_BUILD_RETRY_INTERVAL: 600
DOCKER_BUILDKIT: 0
DOCKER_BUILD_TIMEOUT: 3600
MIRROR_SNAPSHOT: y

View File

@ -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]'