Commit c05a463d authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

feat(ci): remove broken symbolic links

parent d87709c9
...@@ -38,7 +38,8 @@ Deploy to production: ...@@ -38,7 +38,8 @@ Deploy to production:
# don't forget to create ~/web/latest folder manually in the initial configuration on the VM! # 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" - ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/web/r3lab_$CI_JOB_ID"
- scp -P $SSHPORT -r build/* $SSHCONNECT:~/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 ## Backups
......
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