fix: retry rm -rf in CI build to handle runner race condition

This commit is contained in:
russell@unturf.com 2026-02-28 14:27:28 -05:00
parent bdcb69258a
commit 9c7c2fae64

View file

@ -24,7 +24,8 @@ build:
- cp -pr env/static static
- tar -zcf static.tar.gz static
# Clean up the directory outside of the gitlab-runner filesystem.
- rm -rf /opt/make_post_sell/env
# Retry once on failure — rm -rf can race with background processes on build runners.
- rm -rf /opt/make_post_sell/env || (sleep 2 && rm -rf /opt/make_post_sell/env)
# Ensure bin/python symlink exists (Python 3.12 venv may only create python3).
- test -f env/bin/python || ln -sf python3 env/bin/python
# Clone the virtualenv with virtualenv-clone into the desired location.