From a5d71576db27b6c699986e84a7167a23f80f1292 Mon Sep 17 00:00:00 2001 From: Liu Shilong Date: Mon, 9 Jan 2023 13:27:15 +0800 Subject: [PATCH] [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 --- .azure-pipelines/docker-sonic-slave-template.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/docker-sonic-slave-template.yml b/.azure-pipelines/docker-sonic-slave-template.yml index 828f958e5..063f75453 100644 --- a/.azure-pipelines/docker-sonic-slave-template.yml +++ b/.azure-pipelines/docker-sonic-slave-template.yml @@ -53,7 +53,8 @@ jobs: containerRegistry: ${{ parameters.registry_conn }} - bash: | set -ex - image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1) + build_options="$(VERSION_CONTROL_OPTIONS)" + image_tag=$(BLDENV=${{ parameters.dist }} make -f Makefile.work showtag $build_options PLATFORM=generic PLATFORM_ARCH=${{ parameters.arch }} | grep sonic-slave | tail -n 1) image_latest=$(echo $(echo $image_tag | awk -F: '{print$1}'):latest) if echo ${{ parameters.pool }} | grep ${{ parameters.arch }};then image_latest=$(echo ${image_latest} | sed 's/:/-${{ parameters.arch }}:/') @@ -65,7 +66,7 @@ jobs: exit 0 fi - 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 + 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 if [[ "$(Build.Reason)" == "PullRequest" ]];then exit 0 fi