sonic-buildimage/.azure-pipelines/cleanup.yml
Guohan Lu 4c8bff6c3c [ci]: improve cleanup by claim ownership in source folder
the added change was accidentally removed in commit 092f5378

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-02-10 23:36:32 -08:00

18 lines
530 B
YAML

steps:
- script: |
if sudo [ -f /var/run/march/docker.pid ] ; then
pid=`sudo cat /var/run/march/docker.pid` ; sudo kill $pid
fi
sudo rm -f /var/run/march/docker.pid
sudo rm -rf /data/march/docker
# clean native docker build
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} .
displayName: "Clean Workspace"