]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-*build: remove ceph-container after done with it 1547/head
authorKefu Chai <kchai@redhat.com>
Mon, 6 Apr 2020 06:19:33 +0000 (14:19 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 6 Apr 2020 06:19:34 +0000 (14:19 +0800)
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 <kchai@redhat.com>
ceph-dev-build/build/build_rpm
ceph-dev-new-build/build/build_rpm

index 8ee38dc937e595762e0d66ef0a8b2136d279d203..8982acbce00a6f01dadbc7b64d0f2454f246b8c4 100644 (file)
@@ -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
index 01c5d5cc0f12fa47a0617a2a490c088ec44672bc..a2e1e7ef96efebaa1d0fcecd94059f4b62da7f90 100644 (file)
@@ -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