[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.
This commit is contained in:
xumia 2022-05-30 16:50:06 +08:00 committed by GitHub
parent 73c5ac11ee
commit 5072315c89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)