fix: harden rm -rf with retry loop and existence check in CI build
This commit is contained in:
parent
17079bd0a8
commit
e2f57e9abb
1 changed files with 2 additions and 2 deletions
|
|
@ -24,8 +24,8 @@ build:
|
|||
- cp -pr env/static static
|
||||
- tar -zcf static.tar.gz static
|
||||
# Clean up the directory outside of the gitlab-runner filesystem.
|
||||
# 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)
|
||||
# rm -rf can race with background processes on build runners — verify removal.
|
||||
- rm -rf /opt/make_post_sell/env; for i in 1 2 3; do [ ! -d /opt/make_post_sell/env ] && break; sleep 2; rm -rf /opt/make_post_sell/env; done; [ ! -d /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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue