How to fix a stuck deployment when the deployment fails because deploy is still locked (from previous failed deployment)
The deployer script locks the deployment while it is running, as to prevent multiple deploy processes to be executed at the same time. Unfortunately if one deploy process completely breaks (i.e. does not get to the unlock part) the deployment stays locked indefinitely. To remedy this situation the deployment needs to get manually unlocked.
Solve this by:
- logging in to the server that the deployer is deploying to
- go to the path that the deployer is deploying to
- remove .dep/deployer.lock file
You can now retry the deployment job in Gitlab.