Skip to content

Commit

Permalink
[ci] Fix issues in docker-slave official build. (#10477)
Browse files Browse the repository at this point in the history
only push latest tag on master build
  • Loading branch information
liushilongbuaa authored Apr 7, 2022
1 parent d83ae1e commit 0330253
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .azure-pipelines/docker-sonic-slave-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ jobs:
containerRegistry: ${{ parameters.registry_conn }}
repository: $(VARIABLE_SLAVE_BASE_IMAGE)
command: push
tags: |
$(VARIABLE_SLAVE_BASE_TAG)
${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
tags: |
$(VARIABLE_SLAVE_BASE_TAG)
latest
${{ else }}:
tags: |
$(VARIABLE_SLAVE_BASE_TAG)
- ${{ if ne(parameters.arch, 'amd64') }}:
- task: Docker@2
condition: ne(variables['Build.Reason'], 'PullRequest')
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/docker-sonic-slave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:
- ${{ each dist in parameters.dists }}:
- ${{ if endswith(variables['Build.DefinitionName'], dist) }}:
- ${{ each arch in parameters.arches }}:
- ${{ if eq(variables['System.PullRequest.TargetBranch'], 'master') }}:
- ${{ if eq(variables[''Build.Reason], 'PullRequest') }}:
- template: docker-sonic-slave-template.yml
parameters:
pool: sonicbld
Expand Down

0 comments on commit 0330253

Please sign in to comment.