[Build]: fix ENABLE_DOCKER_BASE_PULL not working issue in armhf/arm64 (#10330)
Why I did it Fix ENABLE_DOCKER_BASE_PULL not working issue in armhf/arm64 For build in native armhf/arm64, the expected container registry repo name is sonic-slave-<stretch|buster|bullseye> How I did it Publish the slave image to sonic-slave-<stretch|buster|bullseye>.
This commit is contained in:
parent
1ddcfd0c3c
commit
ced22db1e3
@ -23,6 +23,7 @@ pr:
|
||||
- sonic-slave-stretch
|
||||
- sonic-slave-buster
|
||||
- sonic-slave-bullseye
|
||||
- .azure-pipelines
|
||||
|
||||
parameters:
|
||||
- name: 'dists'
|
||||
|
@ -23,6 +23,7 @@ pr:
|
||||
- sonic-slave-stretch
|
||||
- sonic-slave-buster
|
||||
- sonic-slave-bullseye
|
||||
- .azure-pipelines
|
||||
|
||||
parameters:
|
||||
- name: 'dists'
|
||||
|
@ -81,6 +81,10 @@ jobs:
|
||||
|
||||
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE_UPLOAD:latest
|
||||
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE_UPLOAD:$SLAVE_BASE_TAG
|
||||
if [ "$SLAVE_BASE_IMAGE_UPLOAD" != "$SLAVE_DIR" ]; then
|
||||
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_DIR:latest-${{ parameters.arch }}
|
||||
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_DIR:$SLAVE_BASE_TAG
|
||||
fi
|
||||
set +x
|
||||
echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_IMAGE]$SLAVE_BASE_IMAGE_UPLOAD"
|
||||
echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_TAG]$SLAVE_BASE_TAG"
|
||||
@ -89,6 +93,7 @@ jobs:
|
||||
displayName: Build sonic-slave-${{ parameters.dist }}-${{ parameters.arch }}
|
||||
|
||||
- task: Docker@2
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
displayName: Upload image
|
||||
inputs:
|
||||
containerRegistry: ${{ parameters.registry_conn }}
|
||||
@ -97,3 +102,13 @@ jobs:
|
||||
tags: |
|
||||
$(VARIABLE_SLAVE_BASE_TAG)
|
||||
latest
|
||||
- ${{ if ne(parameters.arch, 'amd64') }}:
|
||||
- task: Docker@2
|
||||
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||
displayName: Upload image ${{ parameters.dist }}
|
||||
inputs:
|
||||
containerRegistry: ${{ parameters.registry_conn }}
|
||||
repository: "sonic-slave-${{ parameters.dist }}"
|
||||
command: push
|
||||
tags: |
|
||||
$(VARIABLE_SLAVE_BASE_TAG)
|
||||
|
@ -24,6 +24,7 @@ pr:
|
||||
- sonic-slave-buster
|
||||
- sonic-slave-bullseye
|
||||
- src/sonic-build-hooks
|
||||
- .azure-pipelines
|
||||
|
||||
parameters:
|
||||
- name: 'arches'
|
||||
|
Loading…
Reference in New Issue
Block a user