Commit 59b65308 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

feat(ci): remove broken symbolic links

Merge branch '13-remove-broken-symbolic-links-in-ci-task' into 'master'

Closes #13

See merge request core-services/r3lab/r3-pages!13
parents d87709c9 c05a463d
Pipeline #19451 passed with stages
in 1 minute and 3 seconds
......@@ -38,7 +38,8 @@ Deploy to production:
# don't forget to create ~/web/latest folder manually in the initial configuration on the VM!
- ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/web/r3lab_$CI_JOB_ID"
- scp -P $SSHPORT -r build/* $SSHCONNECT:~/web/r3lab_$CI_JOB_ID
- ssh -p $SSHPORT $SSHCONNECT "cd ~/web/latest && ln -fs ../r3lab_$CI_JOB_ID/* . && cd .. && find . -type d -name 'r3lab*' -not -newermt '-1 minutes' -exec rm -rf {} +"
# Make a symbolic link to newly copied files, then remove old tasks' files, and remove all broken symbolic links
- ssh -p $SSHPORT $SSHCONNECT "cd ~/web/latest && ln -fs ../r3lab_$CI_JOB_ID/* . && cd .. && find . -type d -name 'r3lab*' -not -newermt '-1 minutes' -exec rm -rf {} + && find -L ~/web/latest -type l -delete"
## Backups
Supports Markdown
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