Environments
Keep dev, staging and prod apart, then compare and promote secrets, flags, apps and Coderunners between them.
Every workspace has three environments: dev, staging and prod. Secrets, feature flags, Shell app releases and Coderunners are kept separately in each, so you can change dev without touching prod. When something works, you promote it to the next environment.
What each environment has
| Kept per environment | Promote it? |
|---|---|
| Secrets | Yes. Values are never shown in the comparison |
| Feature flags | Yes. Values are shown in the comparison |
| Shell app releases | Yes. The target app is created if it doesn't exist |
| Coderunners | Yes. The same version is deployed to the target, creating the Coderunner if needed |
| Your data and files | No. Data is never copied between environments |
Apps and Coderunners run against the environment they belong to, and read that environment's secrets and flags. Promoting an app to prod makes the prod copy use prod's settings, with no code changes.
Compare and promote
Open Environments
Go to Build → Environments and pick the workspace.
Choose the two environments
Pick the source and the target, for example staging → prod.
Review each area
Open the Secrets, Feature flags, Apps and Coderunners panels, and review what will change. Where a key already exists in the target, choose whether to skip it or overwrite it.
Promote
Promote each area you reviewed. Coderunners and apps may take a few minutes to build and deploy in the target.
From the CLI, flags have their own commands: gf flags compare dev prod, then gf flags promote dev prod.
Good to know
- Promoting a Coderunner doesn't carry its deploy-time environment variables. See Configuration and secrets.
- You need the Writer, Admin or Owner role to promote.