To production
Weik.io 2026.2Devtest and production give the same remote names different values, so weikio promote moves the tested version to production without a rebuild. Product page · Video
Watch: To production, 4:27
The video promotes the transfer to production, where its two ends point at different systems.
This part of the video couldn't be loaded.
The transfer document says remote: supplier-ftp, not a host, and that is what makes promotion work. The name resolves per environment: devtest’s value points at a test system, production’s at the supplier’s server, and the version that runs in both is the same.
Two values of the same remote#
The default value of supplier-ftp is the supplier’s server. Devtest gets a file of its own, which here points at a folder on the devtest agent, so a test run moves files you put there yourself:
apiVersion: weik.io/v1
kind: variable
metadata: { name: supplier-ftp, project: finance }
spec:
value: |
type = ftp
host = ftp.supplier.example
user = weikio
pass = {{supplier-ftp-password}}apiVersion: weik.io/v1
kind: variable
metadata: { name: supplier-ftp, project: finance, environment: devtest }
spec:
value: |
type = alias
remote = /var/lib/weikio/test-filesWith this value the transfer’s path /outgoing is the folder /var/lib/weikio/test-files/outgoing in the agent’s home, which on the agent’s host is home/test-files/outgoing in the agent’s folder. Because the variable has the whole remote definition, the two environments don’t even need the same kind of system. For a supplier’s test FTP server, write that server’s definition in devtest’s file instead.
Promote#
Production needs its own values of the two secrets:
$ weikio secret set finance/supplier-ftp-password --env production
$ weikio secret set finance/invoice-archive-key --env productionOnce a run on devtest moved what it should, promote the version:
$ weikio promote finance/supplier-invoices --from devtest --to productionNothing is rebuilt, because the host was never in the version. Production’s deployment gets the version devtest ran. Check what it gets before its first run:
$ weikio get variables --env production --resolved --integration supplier-invoicesThe list has each value the transfer gets in production and where it comes from. The secrets show as ********, and a deploy with a secret missing in production fails before anything starts, with the command that sets it.
Change the server later#
When the supplier moves its server, edit the one variable file and apply it. The apply lists the deployments that take the new value at their next start, with the command that restarts each one now:
$ weikio apply -f ./finance/variables/supplier-ftp.yaml
$ weikio restart finance/supplier-invoices --env productionA password the remote gets through a placeholder works the same way with weikio secret set, which lists the deployments that use it and restarts them when you add --restart.
Through Git#
In a repository, promotion is a pull request that changes the version in finance/production/deployments/supplier-invoices.yaml. The reviewers see what will run, and the production workflow applies it after their approval. Keep integrations in Git has the workflow files.