From 88ad1751dab1fd51c0f9409b85831e29772beaa3 Mon Sep 17 00:00:00 2001 From: zitingguo-ms Date: Thu, 1 Dec 2022 14:26:07 +0800 Subject: [PATCH] Publish docker saiserverv2 in 202205 branch (#12882) Why I did it Publish docker saiserverv2 in the build pipeline. How I did it Cherry-pick #12842 from master to 202205 branch. How to verify it Run test in #12843 and it has been built out successfully. --- .azure-pipelines/azure-pipelines-build.yml | 11 +++++++++++ .azure-pipelines/build-template.yml | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index 8125db1949..72af591b08 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -130,9 +130,20 @@ jobs: make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw fi if [ $(docker_syncd_rpc_image) == yes ]; then + # workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz + pushd ./src/sonic-sairedis/SAI + git stash + popd if [ $(GROUP_NAME) == broadcom ]; then make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-dnx-rpc.gz + pushd ./src/sonic-sairedis/SAI + git stash + popd + make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-saiserverv2-brcm.gz + pushd ./src/sonic-sairedis/SAI + git stash + popd fi fi if [ $(syncd_rpc_image) == yes ]; then diff --git a/.azure-pipelines/build-template.yml b/.azure-pipelines/build-template.yml index 2665f46452..7b5ec1ed27 100644 --- a/.azure-pipelines/build-template.yml +++ b/.azure-pipelines/build-template.yml @@ -105,6 +105,16 @@ jobs: fi if [ ${{ parameters.sync_rpc_image }} == true ]; then make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y target/docker-syncd-${{ parameters.platform_short }}-rpc.gz + # workaround for issue in rules/sairedis.dep, git ls-files will list un-exist files for cache + pushd ./src/sonic-sairedis/SAI + git stash + popd + if [ ${{ parameters.platform }} == broadcom ]; then + make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) ENABLE_SYNCD_RPC=y SAITHRIFT_V2=y target/docker-saiserverv2-brcm.gz + pushd ./src/sonic-sairedis/SAI + git stash + popd + fi fi make USERNAME=admin $CACHE_OPTIONS SONIC_BUILD_JOBS=$(nproc) target/sonic-${{ parameters.platform }}.bin