From: Kefu Chai Date: Mon, 6 Apr 2020 06:19:33 +0000 (+0800) Subject: ceph-dev-*build: remove ceph-container after done with it X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1547%2Fhead;p=ceph-build.git ceph-dev-*build: remove ceph-container after done with it because `ceph-container` contains the artifacts created using `root` user after 6090e4d00c82b8aba1d56ed249f29352e7c308d6, for instance, the `staging` directory is created by https://github.com/ceph/ceph-container/blob/2f61465f6a91f15470ff4f87844c5fe9c64b9664/maint-lib/stage.py#L102 so we need to remove `ceph-container` after pushing the created image using `sudo` as well. otherwise, jenkins is not able to cleanup the workspace using the "jenkins-build" user. Signed-off-by: Kefu Chai --- diff --git a/ceph-dev-build/build/build_rpm b/ceph-dev-build/build/build_rpm index 8ee38dc9..8982acbc 100644 --- a/ceph-dev-build/build/build_rpm +++ b/ceph-dev-build/build/build_rpm @@ -206,6 +206,7 @@ if [[ "$CI_CONTAINER" == true && $DISTRO == "centos" && $FLAVOR == "default" ]] # avoid failing the build if build-push fails sudo -E CI_CONTAINER=${CI_CONTAINER} SHA1=${SHA1} /bin/bash ./contrib/build-push-ceph-container-imgs.sh || /bin/true cd $WORKSPACE + sudo rm -rf ceph-container fi # update shaman with the completed build status diff --git a/ceph-dev-new-build/build/build_rpm b/ceph-dev-new-build/build/build_rpm index 01c5d5cc..a2e1e7ef 100644 --- a/ceph-dev-new-build/build/build_rpm +++ b/ceph-dev-new-build/build/build_rpm @@ -207,6 +207,7 @@ if [[ $CI_CONTAINER == "true" && $DISTRO == "centos" && $FLAVOR == "default" ]] # avoid failing the build if build-push fails sudo -E CI_CONTAINER=${CI_CONTAINER} SHA1=${SHA1} /bin/bash ./contrib/build-push-ceph-container-imgs.sh || /bin/true cd $WORKSPACE + sudo rm -rf ceph-container fi # update shaman with the completed build status