diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml index 1e85060b4..c43836f1e 100644 --- a/.azure-pipelines/azure-pipelines-image-template.yml +++ b/.azure-pipelines/azure-pipelines-image-template.yml @@ -45,7 +45,9 @@ jobs: ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) configure displayName: 'Make configure' postSteps: - - publish: $(System.DefaultWorkingDirectory)/target + - script: cp target -r $(Build.ArtifactStagingDirectory)/ + displayName: Copy Artifacts + - publish: $(Build.ArtifactStagingDirectory) artifact: 'sonic-buildimage.$(GROUP_NAME)$(GROUP_EXTNAME)' displayName: "Archive sonic image" - ${{ parameters.postSteps }} diff --git a/.azure-pipelines/cleanup.yml b/.azure-pipelines/cleanup.yml index ffbcf298b..6569c8ed0 100644 --- a/.azure-pipelines/cleanup.yml +++ b/.azure-pipelines/cleanup.yml @@ -10,8 +10,5 @@ steps: if sudo [ -f dockerfs/var/run/docker.pid ] ; then pid=`sudo cat dockerfs/var/run/docker.pid` ; sudo kill $pid fi - sudo rm -rf dockerfs - sudo rm -rf fsroot - username=$(id -un) - sudo chown -R ${username}.${username} . + sudo rm -rf $(ls -A1) displayName: "Clean Workspace"