From e6699a0132c141b000af99521eab1fabf6942921 Mon Sep 17 00:00:00 2001 From: Shilong Liu Date: Fri, 17 Sep 2021 16:18:36 +0800 Subject: [PATCH] Add pipeline to build vhdx image. (#8665) * Add pipeline to build vhdx image --- .azure-pipelines/azure-pipelines-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index eb3c3aa21b..2b90f6bf3c 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -104,6 +104,11 @@ 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 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 + SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make sonic-slave-run + rm target/sonic-vs.img + fi else if [ $(dbg_image) == yes ]; then make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-$(GROUP_NAME).bin && \