From fd287b7d24a2113fe189751450d1e0ea808cdd19 Mon Sep 17 00:00:00 2001 From: Yakiv Huryk <62013282+Yakiv-Huryk@users.noreply.github.com> Date: Mon, 4 Jul 2022 03:40:04 +0300 Subject: [PATCH] [ci] add docker-sonic-vs with ASAN build (#11297) The asan-enabled docker image will be used in other CIs that run DVS tests. Why I did it To add a possibility to run DVS tests with ASAN for other CIs (e.g. swss). How I did it Added the 'asan_image' flag to the vs job group. How to verify it Run the CI and check the docker-sonic-vs-asan.gz artifact. --- .azure-pipelines/azure-pipelines-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index f7eeb8c95d..73cf108df6 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -30,6 +30,7 @@ jobs: BUILD_OPTIONS: ${{ parameters.buildOptions }} DOCKER_DATA_ROOT_FOR_MULTIARCH: /data/march/docker dbg_image: no + asan_image: no swi_image: no raw_image: no docker_syncd_rpc_image: no @@ -42,6 +43,7 @@ jobs: - name: vs variables: dbg_image: yes + asan_image: yes - name: barefoot variables: @@ -106,6 +108,10 @@ jobs: make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz mv target/sonic-vs.img.gz target/sonic-vs-dbg.img.gz fi + if [ $(asan_image) == yes ]; then + make $BUILD_OPTIONS ENABLE_ASAN=y target/docker-sonic-vs.gz + mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz + fi make $BUILD_OPTIONS target/docker-sonic-vs.gz target/sonic-vs.img.gz target/docker-ptf.gz if [ $(Build.Reason) != 'PullRequest' ];then gzip -kd target/sonic-vs.img.gz