We have a deployment task for moving .wars and service configuration from Bamboo builds to tomcat test servers.
- Clean working directory
- Artifact download
- SCP Task- Copy war to server
- SSH - Clean next folder
- SSH - Explode war
- SSH - Explode serverconfig
- SSH - restart server
If the process is interrupted or times out the next deployment fails on step 4 ( rm -rf /opt/acton/tomcat/releases/theapp-next ) with a flood of "permission denied".
The user and ssh key in those steps have access to the directories. When I log in with them I can clear out theapp-next by hand and subsequent deployments succeed.
Does anyone know what causes this behavior and how to work around it?