A common deployment failure occurs when a CI/CD pipeline reports success despite the application failing to update on the server. In a case involving GitHub Actions and Docker Compose, the deployment script continued to execute even after a docker pull command failed due to an authentication error, causing the system to restart containers using the existing local image.
The issue stemmed from the configuration of the appleboy/ssh-action@v0.1.10, where the script_stop parameter was disabled. Consequently, the pipeline proceeded to execute docker compose down and docker compose up -d, leading to a false positive status. The mismatch between the intended and running code was confirmed by inspecting the container image ID and verifying the contents of the deployed JAR file.
To prevent such incidents, developers should include set -e at the beginning of remote scripts to ensure execution halts upon the first error. This prevents the system from stopping active containers if the new image fails to download. Additionally, using specific commit SHA tags instead of the latest tag helps track versions, though it does not replace the need for robust error handling.
For better diagnostics, it is recommended to include OCI labels like org.opencontainers.image.revision in build metadata. While SHA tags improve version traceability, they require a proper registry retention policy to avoid storage overflow. Ultimately, developers must verify logs even when pipelines appear successful and ensure that deployment scripts are designed to fail fast.





