Skip to content

Commit

Permalink
[ci] Update azp template variable for reproducible build. (sonic-net#…
Browse files Browse the repository at this point in the history
  • Loading branch information
liushilongbuaa authored and xumia committed Oct 10, 2022
1 parent 4d97885 commit c3f9ce5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .azure-pipelines/azure-pipelines-repd-build-variables.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
variables:
${{ if and(ge(variables['Build.SourceBranchName'], '202012'), le(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'
${{ if or(lt(variables['Build.SourceBranchName'], '202012'), gt(variables['Build.SourceBranchName'], '299999')) }}:
${{ else }}:
VERSION_CONTROL_OPTIONS: ''
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ resources:
ref: master

variables:
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml
- template: .azure-pipelines/azure-pipelines-repd-build-variables.yml@buildimage
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- template: .azure-pipelines/template-variables.yml
- ${{ else }}:
Expand Down

0 comments on commit c3f9ce5

Please sign in to comment.