Bamboo "Deployment failed" in CI
A deployment executed its environment's tasks and one failed. The usual causes are a non-zero deploy command, a missing input artifact, an unresolved variable, or the target host rejecting the connection.
What this error means
The deployment result shows "Deployment failed" or "Deployment of release <v> to <env> failed", with the failing task in the deployment log.
Deployment of release 1.4.0 to Production failed.
scp: /var/www/app: Permission denied
Failing task since return code of the command was 1 and not 0.Common causes
A deployment task exited non-zero
A deploy script, SCP/SSH, or CLI command failed on the target, so the environment execution failed.
A missing artifact or unresolved variable
The deployment expected an artifact from the build that was not produced, or referenced a variable that did not resolve, breaking the task.
How to fix it
Read the failing deployment task
- Open the deployment log and find the task that returned non-zero.
- Fix the underlying cause (permissions on the target, wrong path, missing artifact).
- Confirm required artifacts and variables resolve, then re-deploy.
Verify artifacts and variables for the environment
Ensure the build produced the shared artifacts the deployment consumes and that every ${bamboo.X} the tasks use is defined at deployment scope.
How to prevent it
- Validate deploy credentials and target paths before promoting releases.
- Confirm required build artifacts exist before the deployment runs.
- Define deployment-scoped variables so tasks never receive placeholders.