Problem
Manual releases were slow, inconsistent, and difficult to validate safely after deployment.
Case study
Manual releases were slow, inconsistent, and difficult to validate safely after deployment.
Anonymized production environment using Bitbucket Pipelines, SSH, PM2, Health Checks. Client names, domains, and private infrastructure details are intentionally omitted.
Deployment secrets needed secure handling Server-side release steps needed predictable behavior Health checks needed to be simple and useful
Created Bitbucket Pipelines for automated builds, secure artifact transfer, server-side deployment, process restart, and health validation.
Mapped manual release steps Reviewed build and restart commands Identified deployment validation checks
Pipeline run reviewed Health check step confirmed Rollback notes prepared
Repeatable release pipeline with validation checks, controlled restart steps, and handover notes.
Bitbucket Pipelines, SSH, PM2, Health Checks
The starting point is writing down the exact manual steps someone performs today: which commands, in what order, on which server, and how they check it worked. Those steps become pipeline stages: install dependencies with a lock file, run tests, build, package the result as an artifact, and transfer it to the server.
The pipeline connects to the server with a dedicated deploy key that can only do what deployment requires, stored as a secured pipeline variable. The deploy user has no broader sudo rights than needed. Releases go into a new directory and a symlink is switched to the new version, so the previous release stays on disk for an instant rollback.
After PM2 reloads the process, the pipeline calls a health endpoint and checks a few key routes. If the check fails, the pipeline marks the deployment as failed and the team switches the symlink back to the previous release. The result is a release that anyone on the team can trigger, with the same steps and checks every time.
Automation works best when every step is documented, repeatable, and easy to validate after release.
Consultation
Share your stack, risk level, and delivery goal. You will get a practical scope conversation instead of a generic sales pitch.