Promote to production¶
Deploy a version that already runs in a development environment to a production environment, with a plan first and an explicit confirmation.
Prerequisites¶
- A production environment in the product. Create one with
alis environment new <org>.<product> --display-name "Production" --production, or in the console under the product's Services page with Add environment and Production as the Environment type. - A built version you have validated in development.
Steps¶
-
Confirm the deployment environment ids and which one is production.
Each deployment environment shows
id,displayName,productionandallowedBranches. -
Designate the branch production deploys from, once. The designation is stored on the deployment environment; nothing is deployed.
From then on a version built from another branch asks for confirmation (
--allow-branch-mismatch).--clearremoves the designation. The deployment environment's Overview page shows it under Deploy designation. -
Plan the deploy of the exact version. A plan is not gated.
Read the plan in the result and in
alis logs deploy <operation>. -
Deploy the same version with confirmation.
At an interactive terminal you can leave out
--confirm-productionand answer the[y/N]prompt instead. In scripts and from coding agents the flag is required: without it the command exits with code 3 andPRODUCTION_CONFIRMATION_REQUIRED. Approval applies to that one deployment. -
Verify.
The console's Services page shows the version now running in production.
Production variables¶
Changing or revealing a production environment's variables is gated the same way: alis environment set|unset ... --confirm-production and alis environment variables --reveal --confirm-production.