Build and deploy
Deployments
AvailableA deployment is one release of a service: an exact image with an exact configuration.
Because both halves are exact, a deployment can always be repeated. That is what makes rollback reliable: the old release is still there, unchanged.
What happens in a deployment
- 1
Prepare
RunOne fixes the configuration: the service's variables and secrets, as they are now, become a numbered configuration.
- 2
Build
If the service comes from a Git repository, an image is built from the exact commit. A service that uses a ready-made image skips this.
- 3
Deploy
The server pulls the image and starts the new version next to the old one.
- 4
Verify
RunOne waits for the new version to pass its health check. Only then does it take traffic.
- 5
Active
The new version serves requests and the old one is removed. If any step fails, the old version keeps serving and the deployment is marked failed, with the reason.
A service runs one deployment at a time. The first deployment places the service on a server; later ones go to the same server.
Four actions that sound alike
| Action | New deployment? | Image | Configuration |
|---|---|---|---|
| Restart | No | Current | Current |
| Deploy | Yes | Newly built from Git, or the image in Settings | Latest |
| Redeploy | Yes | The one of the deployment you pick | Latest |
| Roll back | Yes | The one of the deployment you pick | The one that deployment had |
A rollback never edits history. It creates a new deployment from an old one.
Deploying on push
On a service's Settings tab, Create hook address gives an address that deploys the service when it is called. Add it to your repository as a webhook for push events, with content type application/json. Only a push to the service's own branch starts a deployment.
The address is the credential: it is shown once, and creating a new one retires the old one. A CI job can call it too:
curl -X POST https://runone.example.com/hooks/deploy/rh_…Where to look when one fails
The Deployments page shows the reason beside a failed deployment. The build log is on Pipelines, and what the container printed is on the service's Logs tab.