Skip to content

Clean old deployment directories #1321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: ep2025
Choose a base branch
from
Open

Clean old deployment directories #1321

wants to merge 7 commits into from

Conversation

nikoshell
Copy link
Contributor

@nikoshell nikoshell commented Jun 14, 2025

Fix #1300

cd $(RELEASES_DIR) && \
ls -1dt */ |                         # list dirs by modification time
grep -v "^current/?$$" |             # skip the 'current' symlink
grep -v "^$(TIMESTAMP)/$$" |         # skip the one we just deployed
tail -n +4 |                         # keep the latest 3
xargs -r echo rm -rf                 # delete the rest (dry-mode with echo)

with "echo" in the command it's dry-mode

example output
image

@europython-society
Copy link
Member

europython-society commented Jun 14, 2025

Preview available

Key Value
url https://ep2025-space.ep-preview.click
last update 2025-06-22T17:16:19.987Z

@nikoshell nikoshell requested a review from egeakman June 14, 2025 21:32
@nikoshell nikoshell self-assigned this Jun 16, 2025
@clytaemnestra clytaemnestra added the DO-NOT-MERGE Not ready to be merged yet label Jun 16, 2025
@clytaemnestra clytaemnestra requested a review from artcz June 16, 2025 18:12
@nikoshell nikoshell changed the title One directory per branch Clean old deployment directories Jun 21, 2025
@nikoshell nikoshell requested a review from clytaemnestra June 22, 2025 07:50
@nikoshell nikoshell removed the DO-NOT-MERGE Not ready to be merged yet label Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cronjob to periodically remove old builds
3 participants