The directory created by SUDO cannot be cleaned by jenkins.
https://build.opnfv.org/ci/job/daisy-kolla-build-master/31/
Change-Id: I02f11d72a80e173f7fef9d3b875f95c2d7b4f626
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
# download and checksum base image, conditionally if local copy is outdated
download() {
- test -d $workdir || mkdir -p $workdir
+ test -d $workdir || {
+ mkdir -p $workdir
+ test -z $SUDO_USER || chown -R $SUDO_USER:$SUDO_USER $workdir
+ }
cd $workdir
rm -f sha256sum.txt
wget $sha256sum_url