DocsGetting startedCreate your first Environment

Create your first Environment

Onboard a repository and create a pull-request Environment from a correct Lifecycle configuration.

Use this procedure to create a deployed pull-request Environment from an onboarded repository.

Prerequisites

Before you start, make sure that you have:

  • Access to a Lifecycle installation
  • A repository where the Lifecycle GitHub App is installed
  • Permission to create a branch and pull request
  • A correct lifecycle.yaml in the repository root

Installing the GitHub App and onboarding a repository are different steps. Lifecycle ignores repository webhooks until the repository is onboarded. Complete Onboard a repository before opening the pull request.

For a disposable example, fork GoodRxOSS/lifecycle-examples. Then, replace each repository value in lifecycle.yaml with a repository that you can access.

Create the Environment

Create a branch

Validate the configuration

Lifecycle accepts lifecycle.yaml, lifecycle.yml, .lifecycle.yaml, and .lifecycle.yml. The recommended name is lifecycle.yaml.

If you use the Lifecycle CLI, validate before pushing:

The server also validates the pushed file. See Lifecycle CLI for CLI validation.

Commit and push

Open a pull request

Open a pull request from the branch into the repository’s default branch.

  • If environment.autoDeploy is true, opening the pull request queues the Environment automatically.
  • If environment.autoDeploy is not true, add the configured deploy label. The default label is lifecycle-deploy!.

Label names are operator-configurable. Use the label that your installation shows. Do not hard-code the default name in automation.

Follow the Lifecycle comment

Lifecycle posts a Mission Control comment with the Environment identifier, selected Services, actions, and a link to the UI. Lifecycle also adds status updates by default. If your organization disabled default status comments, apply its configured status-comment label.

Check the result

Open the Environment link.

Check these results:

  • The Environment reaches Deployed.
  • Each necessary Service reaches Ready.
  • The Service URL opens the expected application.

You can also wait from a terminal:

If Lifecycle does not comment, start with Missing pull-request comment. If a Service fails, use the phase-specific build or deployment guide.

Next steps