Deploying and versions
Upload new versions, deploy or roll back, deploy from Git, and promote between environments.
Every upload creates a new version of your Coderunner. Deploying puts a version into service with its settings. Because old versions are kept, you can roll back by deploying an earlier one.
From upload to running
| Step | What happens | Status to watch |
|---|---|---|
| Upload | Your ZIP becomes a new version and starts building | Build: Completed or Failed |
| Deploy | The built version starts running with its settings | Deployment: Deployed or Failed |
| Run | A Function answers requests; a Job or Schedule runs | Execution: Succeeded or Failed |
In the CLI, gf deploy does the first two steps and waits for each. If the new deployment fails, gf deploy exits with an error and the reason, and the previous version keeps serving. While a new version is being deployed, the Client Portal keeps showing the previous Deployment URL until the new one is ready.
Deploy a different version
To roll back, deploy an earlier version:
- Client Portal: open the Coderunner, pick the version and deploy it.
- API:
POST …/coderunners/{coderunner_id}/deploywith thatversion_id. List versions withGET …/coderunners/{coderunner_id}/versions.
To upload without deploying, use gf deploy --skip-deploy.
Deploy from Git
Deploy straight from a Git repository instead of a ZIP:
gf deploy --git https://github.com/acme/greeter.git --ref mainAdd --subdir if the code lives in a folder of the repository.
Deploys from Git, and the promotions below, don't carry your environment variables, so keep settings your code always needs in the code itself.
To redeploy on every push, connect a Git source to the Coderunner in the Client Portal and add the webhook it gives you to your repository. For a private repository, store an access token in Secrets and choose it when connecting. The Git source API is in the Coderunners API.
Code from a machine client
If a machine client, for example from CI, uploaded the code or connected the Git source, it can't run with more access than that client had. Deploying, starting, promoting or deploying it from Git on a Coderunner whose attached client can do more, or that has a workload identity, is refused; a workspace member can click Deploy anyway as me, or upload the code again. When the Git source sheet says Push deploys are paused, a member checks the settings and clicks Save to resume them. See Who supplied the code.
Promote between environments
A Coderunner belongs to one environment, such as dev or prod. When a version works in dev, promote it: Groundfloor deploys the same version to the matching Coderunner in the target environment, and creates that Coderunner if it doesn't exist yet. Compare the two environments first to see what will change. See Environments.
A Coderunner can't move to another environment; to run it elsewhere, promote it or create a Coderunner there. One that shows No environment isn't in any environment, so it can't be promoted until you bind it to one. Binding is permanent.
If the Coderunner has a persistent disk, a copy created by the promotion gets its own, empty disk of the same size; data on the disk is never copied.
A Coderunner created by a promotion counts against your plan's Coderunners per workspace, and its disk, if it has one, against your storage limit. If either limit is reached, that Coderunner isn't promoted and the reason is shown on the promote panel; the others still are. See Quotas and limits.
Delete
Deleting a Coderunner removes it from the workspace. You need the Writer, Admin or Owner role. If it has a persistent disk, the disk and everything on it are deleted too; the confirmation says so.
Deleting a version or a deployment of a Coderunner with a persistent disk may delete the disk's data as well. It needs the same permission as deleting the Coderunner, and you type the Coderunner's name to confirm.
Next steps
- Configuration and secrets — settings that apply when you deploy.
- Logs and troubleshooting — when a build or deployment fails.