From b2c8ad8b100005ccbe33bdd6b1a8680230fbe9a0 Mon Sep 17 00:00:00 2001 From: lixiaoyuner <35456895+lixiaoyuner@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:02:07 +0800 Subject: [PATCH] Fix K8S_OPTIONS maybe empty issue (#16891) Why I did it K8S_OPTIONS maybe empty, so there will be syntax error. Need to fix this issue. Work item tracking Microsoft ADO (number only): 25495020 How I did it Add "" for K8S_OPTIONS to avoid exception. How to verify it No more exception is throwed in PR build validation pipeline. --- .azure-pipelines/azure-pipelines-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index e0a0400f850f..961e72a3e564 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -128,7 +128,7 @@ jobs: make $BUILD_OPTIONS ENABLE_ASAN=y target/docker-sonic-vs.gz mv target/docker-sonic-vs.gz target/docker-sonic-vs-asan.gz fi - if [ $(K8S_OPTIONS) == 'INCLUDE_KUBERNETES_MASTER=y' ]; then + if [ "$(K8S_OPTIONS)" == 'INCLUDE_KUBERNETES_MASTER=y' ]; then make $BUILD_OPTIONS $(K8S_OPTIONS) target/sonic-vs.img.gz mv target/sonic-vs.img.gz target/sonic-vs-k8s.img.gz fi