Commit 43d1e0c6 authored by Frederic Pasteleurs's avatar Frederic Pasteleurs

Added automatic cleanup of old releases (>20 days)

parent f1d12b08
Pipeline #202172888 failed with stages
in 1 minute and 43 seconds
......@@ -43,7 +43,7 @@ Deploy:
stage: Deploy
script:
- echo $(date +%Y.%m.%d)
- tar cz public | ssh [email protected] "mkdir -p /www/versions/$(date +%Y.%m.%d); cd /www/versions/$(date +%Y.%m.%d); tar xz; rm /www/live; ln -sf versions/$(date +%Y.%m.%d)/public /www/live"
- tar cz public | ssh [email protected] "mkdir -p /www/versions/$(date +%Y.%m.%d); cd /www/versions/$(date +%Y.%m.%d); tar xz; rm /www/live; ln -sf versions/$(date +%Y.%m.%d)/public /www/live; find /home/gitlab-jail/www/versions/* -type d -ctime +20 -exec rm -rf {} \;"
Notify:
stage: Notify
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment