[CI] Fix pipeline template artifacts struct bug and cleanup bug

Signed-off-by: liushilongbuaa <shilongliu@microsoft.com>
This commit is contained in:
liushilongbuaa
2021-04-20 09:17:05 +08:00
committed by lguohan
parent 6bc660e11b
commit d7fc384b6f
2 changed files with 4 additions and 5 deletions

View File

@@ -45,7 +45,9 @@ jobs:
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) configure ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) configure
displayName: 'Make configure' displayName: 'Make configure'
postSteps: postSteps:
- publish: $(System.DefaultWorkingDirectory)/target - script: cp target -r $(Build.ArtifactStagingDirectory)/
displayName: Copy Artifacts
- publish: $(Build.ArtifactStagingDirectory)
artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)' artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)'
displayName: "Archive sonic image" displayName: "Archive sonic image"
- ${{ parameters.postSteps }} - ${{ parameters.postSteps }}

View File

@@ -10,8 +10,5 @@ steps:
if sudo [ -f dockerfs/var/run/docker.pid ] ; then if sudo [ -f dockerfs/var/run/docker.pid ] ; then
pid=`sudo cat dockerfs/var/run/docker.pid` ; sudo kill $pid pid=`sudo cat dockerfs/var/run/docker.pid` ; sudo kill $pid
fi fi
sudo rm -rf dockerfs sudo rm -rf $(ls -A1)
sudo rm -rf fsroot
username=$(id -un)
sudo chown -R ${username}.${username} .
displayName: "Clean Workspace" displayName: "Clean Workspace"