Skip to content

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

  1. Confirm the deployment environment ids and which one is production.

    alis environment list acme.sh --json
    

    Each deployment environment shows id, displayName, production and allowedBranches.

  2. Designate the branch production deploys from, once. The designation is stored on the deployment environment; nothing is deployed.

    alis environment branches acme.sh.<prod-env-id> --allow main
    

    From then on a version built from another branch asks for confirmation (--allow-branch-mismatch). --clear removes the designation. The deployment environment's Overview page shows it under Deploy designation.

  3. Plan the deploy of the exact version. A plan is not gated.

    alis deploy acme.sh.orders.v1 --version 1.4.2 -e <prod-env-id> --plan-only
    

    Read the plan in the result and in alis logs deploy <operation>.

  4. Deploy the same version with confirmation.

    alis deploy acme.sh.orders.v1 --version 1.4.2 -e <prod-env-id> --confirm-production
    

    At an interactive terminal you can leave out --confirm-production and answer the [y/N] prompt instead. In scripts and from coding agents the flag is required: without it the command exits with code 3 and PRODUCTION_CONFIRMATION_REQUIRED. Approval applies to that one deployment.

  5. Verify.

    alis logs runtime acme.sh.orders.v1 -e <prod-env-id> --since 15m
    

    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.