DocsGetting startedConfigure an Environment

Configure an Environment

Set Service selection, dependencies, builds, and deployments in lifecycle.yaml.

Use the repository-root lifecycle.yaml to define the initial and optional Services. The file also defines relationships between Services.

Start with a small Service set

This example uses generalized repository and Service names. Replace all repositories, paths, ports, and branches with values from your application:

When the CLI is available, validate the file before you push it:

Select default and optional Services

  • Lifecycle selects defaultServices when it first creates the Environment.
  • Mission Control shows optionalServices as selectable Services. Lifecycle builds them only after selection.

To try the optional worker Service:

  1. Open the Mission Control comment on the pull request.
  2. Select the worker checkbox.
  3. Save the comment.
  4. Wait until Lifecycle saves the selection.
  5. Before the worker deploy begins, make sure that api is available.

Clear the checkbox. Lifecycle then uses the default Service set again. Each saved selection can queue work. Put related checkbox changes in one edit.

Use different controls for inclusion and deployment order

requires and deploymentDependsOn control different operations:

  • requires includes a different Service when its parent Service is selected.
  • deploymentDependsOn waits for named Services to deploy successfully before starting the dependent Service.

The example worker includes api and waits for it. requires does not create deployment ordering by itself. See Service dependencies for cycle and failure behavior.

Use resolved Service values

Lifecycle resolves template variables in supported build and deployment configuration. The example gives the current api public URL to web:

Use only a documented variable. Select the public or internal hostname that matches the caller’s network path. See Template variables.

Static fallback

A Service can set defaultUUID to reference a long-lived static Environment when that Service is not selected:

⚠️

defaultUUID does not create or operate the static Environment. Use it only when your platform team operates that specified Environment ID. The team must also define ownership, compatibility, and cleanup policies. If the team does not define them, select the Service in the current Environment.

Check the change

After pushing the configuration:

  1. Make sure that Lifecycle accepts the file without a configuration error.
  2. Examine the selected Service set in Mission Control.
  3. Check dependency ordering in the Environment timeline or logs.
  4. Open the application.
  5. Test the path that uses the resolved dependency.

Continue with Use the Mission Control comment for branch, URL, and Environment overrides.