]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
monitoring/ceph-mixin: make jsonnet-bundler clone idempotent 69156/head
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Sat, 20 Jun 2026 15:21:01 +0000 (23:21 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Sat, 20 Jun 2026 15:22:01 +0000 (23:22 +0800)
A run that aborts before the cleanup fixture runs (timeout, OOM,
interrupt) leaves the clone dir behind, so the next build fails with
"destination path already exists". Remove it first.

Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
monitoring/ceph-mixin/jsonnet-bundler-build.sh

index 463658f186bfa6acac58e4d4d35cd1814190cb3b..bb5b323500c9cef7d26fcbd846a6722de215ec9a 100755 (executable)
@@ -3,6 +3,8 @@
 JSONNET_VERSION="v0.6.0"
 OUTPUT_DIR=${1:-$(pwd)}
 
+# clean up leftovers from an aborted run so the clone stays idempotent
+rm -rf jsonnet-bundler
 git clone -b ${JSONNET_VERSION} --depth 1 https://github.com/jsonnet-bundler/jsonnet-bundler
 make -C jsonnet-bundler  build
 mv jsonnet-bundler/_output/jb ${OUTPUT_DIR}