From 04723238601c9a58e1c6381fe9c76ecbcfc64180 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Thu, 29 Apr 2021 07:01:07 +0800 Subject: [PATCH] [ci] Fix the generating version file failure issue caused by artifacts folder change (#7464) Fix the generating version file failure issue caused by artifacts folder change. When changing to use the same template for PR build, official build and packages version upgrade, the artifacts folder adding a "target" folder, the version upgrade task should be changed accordingly. --- .azure-pipelines/azure-pipelines-UpgrateVersion.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index 5ed7740b6d..76c7c911a2 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -73,14 +73,14 @@ stages: default_platform=broadcom artifacts=$(find $(Pipeline.Workspace) -maxdepth 1 -type d -name 'sonic-buildimage.*' | grep -v "sonic-buildimage.${default_platform}") echo "artifacts$artifacts" - cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/versions target/ + cp -r $(Pipeline.Workspace)/sonic-buildimage.${default_platform}/target/versions target/ make freeze FREEZE_VERSION_OPTIONS=-r find files/build/versions ordered_artifacts=$(echo "$artifacts" | grep -v -E "arm64|armhf" && echo "$artifacts" | grep -E "arm64|armhf") for artifact in $ordered_artifacts do rm -rf target/versions - cp -r $artifact/versions target/ + cp -r $artifact/target/versions target/ OPTIONS="-a -d" [[ "$artifact" == *arm64* || "$artifact" == *armhf* ]] && OPTIONS="-d" make freeze FREEZE_VERSION_OPTIONS="$OPTIONS"