[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-stretch
|
||||||
- sonic-slave-buster
|
- sonic-slave-buster
|
||||||
- sonic-slave-bullseye
|
- sonic-slave-bullseye
|
||||||
|
- .azure-pipelines
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: 'dists'
|
- name: 'dists'
|
||||||
|
@ -23,6 +23,7 @@ pr:
|
|||||||
- sonic-slave-stretch
|
- sonic-slave-stretch
|
||||||
- sonic-slave-buster
|
- sonic-slave-buster
|
||||||
- sonic-slave-bullseye
|
- sonic-slave-bullseye
|
||||||
|
- .azure-pipelines
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: 'dists'
|
- 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:latest
|
||||||
docker tag $SLAVE_BASE_IMAGE:$SLAVE_BASE_TAG $REGISTRY_SERVER/$SLAVE_BASE_IMAGE_UPLOAD:$SLAVE_BASE_TAG
|
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
|
set +x
|
||||||
echo "##vso[task.setvariable variable=VARIABLE_SLAVE_BASE_IMAGE]$SLAVE_BASE_IMAGE_UPLOAD"
|
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"
|
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 }}
|
displayName: Build sonic-slave-${{ parameters.dist }}-${{ parameters.arch }}
|
||||||
|
|
||||||
- task: Docker@2
|
- task: Docker@2
|
||||||
|
condition: ne(variables['Build.Reason'], 'PullRequest')
|
||||||
displayName: Upload image
|
displayName: Upload image
|
||||||
inputs:
|
inputs:
|
||||||
containerRegistry: ${{ parameters.registry_conn }}
|
containerRegistry: ${{ parameters.registry_conn }}
|
||||||
@ -97,3 +102,13 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
$(VARIABLE_SLAVE_BASE_TAG)
|
$(VARIABLE_SLAVE_BASE_TAG)
|
||||||
latest
|
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-buster
|
||||||
- sonic-slave-bullseye
|
- sonic-slave-bullseye
|
||||||
- src/sonic-build-hooks
|
- src/sonic-build-hooks
|
||||||
|
- .azure-pipelines
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
- name: 'arches'
|
- name: 'arches'
|
||||||
|
Loading…
Reference in New Issue
Block a user