Skip to content

Commit a5d7157

Browse files
[ci] Fix docker-sonic-slave pipeline template build options. (#13290)
Why I did it docker-sonic-slave pipeline has a different tag with PR build. It leads to ENABLE_DOCKER_BASE_PUll=y not work. How I did it set reproducible build option in bash. How to verify it
1 parent 24758df commit a5d7157

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.azure-pipelines/docker-sonic-slave-template.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ jobs:
5353
containerRegistry: ${{ parameters.registry_conn }}
5454
- bash: |
5555
set -ex
56-
image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1)
56+
build_options="$(VERSION_CONTROL_OPTIONS)"
57+
image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1)
5758
image_latest=$(echo $(echo $image_tag | awk -F: '{print$1}'):latest)
5859
if echo ${{ parameters.pool }} | grep ${{ parameters.arch }};then
5960
image_latest=$(echo ${image_latest} | sed 's/:/-${{ parameters.arch }}:/')
@@ -65,7 +66,7 @@ jobs:
6566
exit 0
6667
fi
6768
68-
DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker BLDENV=${{ parameters.dist }} make -f Makefile.work configure PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} $args || docker image ls $image_tag
69+
DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker BLDENV=${{ parameters.dist }} make -f Makefile.work configure $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} $args || docker image ls $image_tag
6970
if [[ "$(Build.Reason)" == "PullRequest" ]];then
7071
exit 0
7172
fi

0 commit comments

Comments
 (0)