From 5072315c897ad5681ad23774a62ca2e08f8fdb78 Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 30 May 2022 16:50:06 +0800 Subject: [PATCH] [Ci]: Fix the target directory not empty issue when publishing artifacts #10972 Why I did it Fix the target directory not empty issue when publishing artifacts. Some of the artifacts are published to $(Build.ArtifactStagingDirectory)/target/ before source code checked out. --- .azure-pipelines/azure-pipelines-image-template.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml index 9df0b3ffa6ef..6a9c2790572f 100644 --- a/.azure-pipelines/azure-pipelines-image-template.yml +++ b/.azure-pipelines/azure-pipelines-image-template.yml @@ -48,7 +48,9 @@ jobs: ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) $(BUILD_OPTIONS) configure displayName: 'Make configure' postSteps: - - script: mv target $(Build.ArtifactStagingDirectory)/ + - script: | + mkdir -p $(Build.ArtifactStagingDirectory)/target + mv target/* $(Build.ArtifactStagingDirectory)/target/ displayName: Copy Artifacts condition: always() - publish: $(Build.ArtifactStagingDirectory)