[ci] Fix issues in docker-slave official build. (#10477)
only push latest tag on master build
This commit is contained in:
parent
d83ae1e3dc
commit
0330253fd7
@ -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')
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user