Skip to main content
Environments are the stages of your deployment pipeline, such as development, QA, beta, staging and production. You deploy a release, test it in an early environment, then promote it to later ones as it passes testing. This page uses the promote.py script.

How environments work

When you assign a release to an environment, promote.py writes a key/value pair to that repository’s alias file in this format:
The repository name and environment name are separated by a period. For example:
Each repository has its own alias file, for example:
  • https://cdn.example.com/game/launcher/alias.json
  • https://cdn.example.com/game/gameclient/alias.json
  • https://cdn.example.com/game/maps/alias.json
Once you’ve assigned releases to each environment, the repository’s alias file lists one entry per environment:
The launcher reads these alias files to decide whether it needs to update. Because every environment points into the same repository, you can deploy all releases to the same CDN. A release promoted from internal QA to external QA to production is downloaded by production players from exactly the same files and location your QA team tested. You can also deploy to an internal server first and copy releases to your CDN later, but you don’t have to.

Assign a release to an environment

Run promote.py with the repository, the release and the environment:
A release can be in more than one environment. These examples choose the release by --version; promote.py also accepts --release_id, --description, --latest and --source_environment.

How the launcher picks an environment

The launcher’s workflow names the repositories and the environment it syncs. See Configure the launcher to download your repositories. A QA launcher has "environment": "qa" in its macros:
A production launcher is the same except for "environment": "production". If a player has access to more than one environment, you can change the environment at runtime. See Switch environments with command-line arguments.

Promote between environments

When releases in one environment pass testing, promote them with --source_environment. For example, to move the beta releases to production:
Players in the production environment then sync to the new required releases. Promote between any other environments the same way.