Closed marksabbath closed 2 years ago
Something I noticed in testing was that it's not possible to update the script if you don't include any kind of self-destruct code (i.e.
rm ./path/to/script.sh
). The script will remain on the server, which causes the rsync to be skipped on the next deploy.Would it make sense to just rsync the script regardless of whether the file already exists on the remote?
Hey @apmatthews we've discussed that approach in our standup. @alexanderzuniga proposed that we follow this path implemented but we definitely can revisit it and chat about that when you are back. There's no rush to merge this PR.
JIRA Ticket
What Are We Doing Here
This PR introduces a verification when the post script is set to run. The approach used is: 1. Check if the script exists in the remote host. If exists, run the version in the remote host, if it doesn't exists in the remote host, it will check if the script exists in the repository and rsync it to the remote host and execute.