Environments and promotion
Weik.io 2026.2Copy a tested deployment to the next environment with weikio promote, without a rebuild. Product page · Video
Watch: From devtest to production, 4:22
The video promotes a tested version from devtest to production without a rebuild.
This part of the video couldn't be loaded.
On this page
Every project deploys into the same environments, such as devtest and production, in the order a platform administrator set.
The environments#
$ weikio get environmentsNAME ORDER PRODUCTION EVENTS BUDGET ENTITY EVENTS ENTITY STORE GATEWAYS AGENTS SCHEDULE RUNS
devtest 1 no 2 GiB 1 GiB 512 MiB devtest (default) 1/1 online 256 MiB
production 2 yes 2 GiB 1 GiB 2 GiB - 0/0 online 256 MiBA platform administrator creates the environments, usually as documents in a repository of the platform’s configuration:
apiVersion: weik.io/v1
kind: environment
metadata: { name: devtest }
spec: { displayName: Dev and test, order: 1, isProduction: false, protection: { allowSecretReveal: true, allowLatestVersion: true }, budgets: { entityStoreBytes: 536870912 } }
---
apiVersion: weik.io/v1
kind: environment
metadata: { name: production }
spec: { displayName: Production, order: 2, isProduction: true, protection: { allowSecretReveal: false }, budgets: { entityStoreBytes: 2147483648 } }Each environment has its own event streams and entity store. It has a storage budget for each kind of data it keeps:
- Events
- Entity events
- Schedule runs
- Dead letters
- Entity store
- Handled events
In an environment document, you must set entityStoreBytes. Each budget you leave out gets the installation’s default.
To add a third environment, such as staging, write another environment document.
What a production environment changes#
Weik.io protects an environment with isProduction: true:
- A command that changes it needs the environment from
--envorWEIKIO_ENV, or from the metadata of the document it applies. - A deployment pins a version and can follow
latestonly whenallowLatestVersionis set. - With
allowSecretReveal: false, even a platform administrator can’t read a secret value there.
The CLI never uses a production environment from your context. Here the context’s environment is production, but the command has no --env. The CLI stops and prints the same command with --env added:
$ weikio deploy finance/erp-invoice-exporterror: --env is required to write to production environment 'production'.
To go ahead, run:
weikio deploy finance/erp-invoice-export --env productionPromote#
weikio promote copies a deployment from one environment to the next. Production runs the version devtest ran, without a rebuild:
$ weikio promote finance/erp-invoice-export --from devtest --to productionTarget: https://hub.example, project finance (argument), environment production (--to)
This will promote 'finance/erp-invoice-export' 1.1.0 to production environment 'production'.
Continue? [y/N] y
Promoting finance/erp-invoice-export 1.1.0 (latest) to production...
deployment production/finance/erp-invoice-export updated (version 1.0.0 -> 1.1.0, previous 1.0.0)
Agents: 1 of 1 running after 4.0 sWhen devtest follows latest, production is pinned to the version latest points to at that moment. Production keeps the version it ran before, so weikio rollback can return to it.




When a secret the version needs has no value in production, the promote stops and prints the commands that set it:
$ weikio promote finance/erp-invoice-export --from devtest --to productionTarget: https://hub.example, project finance (argument), environment production (--to)
error: Can't deploy finance/erp-invoice-export 1.1.0 to production: secret 'erp-api-key' has no value.
To set 'erp-api-key', run:
weikio secret set finance/erp-api-key --env production
To set it for this integration only, run:
weikio secret set finance/erp-api-key --integration erp-invoice-export --env productionTo promote an API, run weikio api promote finance/invoices@v1 --from devtest --to production. Production then serves the definition devtest tested.
What changes per environment#
A promoted version is the same in every environment except for its configuration.
| Differs per environment | Where you set it |
|---|---|
| Values such as URLs, sizes and schedules | Variables with an environment, and secrets |
| Which agents run it | The agents’ environment capabilities |
| The API’s hostnames and certificates | The environment’s gateways |
| A deployment’s overrides, Java options and trusted certificates | The deployment |
A promote leaves the overrides of the production deployment as they are.
Promotion from Git#
When you keep your integrations in Git, a promotion is a pull request that changes the version in finance/production/deployments/erp-invoice-export.yaml. The production workflow applies it after the required reviewers approve. Keep integrations in Git has the workflows.