To production
Weik.io 2026.2The same remote names have different values in devtest and production, 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. In production, its two ends point at different systems.
This part of the video couldn't be loaded.
The transfer refers to its source by the remote’s name, remote: supplier-ftp. That name has a different value in each environment, so the same version runs in devtest against a test system and in production against the supplier’s server.
Two values of the same remote#
The default value of supplier-ftp is the supplier’s server. Devtest has a file of its own that points at a folder on the devtest agent. A test run moves the files you put there:
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 home/test-files/outgoing in the site’s folder on its host. Because the variable has the remote’s full definition, the two environments can use different kinds 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 productionProduction’s deployment gets the version devtest ran, with no rebuild, because the host isn’t part of the version. Check the values 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. Secrets show as ********.
Change the server later#
When the supplier moves its server, edit the variable file and apply it. The apply lists the deployments that get the new value at their next start and the command that restarts each one now:
$ weikio apply -f ./finance/variables/supplier-ftp.yaml
$ weikio restart finance/supplier-invoices --env productionFor a password in a placeholder, weikio secret set lists the deployments that use the secret. With --restart, it also restarts them.
Through Git#
In a repository, promotion is a pull request that changes the version in finance/production/deployments/supplier-invoices.yaml. The production workflow applies it after the reviewers approve what will run. Keep integrations in Git has the workflow files.