Skip to content

Commit

Permalink
[Build]: Support reproducible build for release branches (#9426)
Browse files Browse the repository at this point in the history
[Build]: Support reproducible build for release branches #9426
  • Loading branch information
xumia authored Dec 23, 2021
1 parent 48a648c commit faab7d5
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
6 changes: 5 additions & 1 deletion .azure-pipelines/azure-pipelines-UpgrateVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ schedules:
displayName: Daily Build
branches:
include:
- 202012
- 20????
exclude:
- 200???
- 201???
- 202006
always: true

pool: sonicbld
Expand Down
5 changes: 5 additions & 0 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variables:
${{ if and(ge(variables['Build.SourceBranchName'], '202012'), le(variables['Build.SourceBranchName'], '299999')) }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
${{ if or(lt(variables['Build.SourceBranchName'], '202012'), gt(variables['Build.SourceBranchName'], '299999')) }}:
VERSION_CONTROL_OPTIONS: ''
4 changes: 3 additions & 1 deletion .azure-pipelines/official-build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: cache
- name: CACHE_MODE
value: cache
- template: azure-pipelines-repd-build-variables.yml
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
6 changes: 3 additions & 3 deletions .azure-pipelines/official-build-multi-asic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: wcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
- template: azure-pipelines-repd-build-variables.yml
- name: CACHE_MODE
value: wcache
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
6 changes: 3 additions & 3 deletions .azure-pipelines/official-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: wcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web'
- name: CACHE_MODE
value: wcache
- template: azure-pipelines-repd-build-variables.yml
jobs:
- template: azure-pipelines-build.yml
parameters:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ on:
- reopened
branches:
- '202012'
- '202[1-9][0-9][0-9]'
- '20[3-9][0-9][0-9][0-9]'
paths:
- 'files/build/versions/**'

Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ stages:
- stage: Build
pool: sonicbld
variables:
CACHE_MODE: rcache
${{ if eq(variables['Build.SourceBranchName'], '202012') }}:
VERSION_CONTROL_OPTIONS: 'SONIC_VERSION_CONTROL_COMPONENTS=deb,py2,py3,web,git,docker'
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml
- name: CACHE_MODE
value: rcache
jobs:
- template: .azure-pipelines/azure-pipelines-build.yml
parameters:
Expand Down

0 comments on commit faab7d5

Please sign in to comment.