Configuring Automations
Explore Gitpod Flex’s automation features: Services and Tasks. Learn how to configure long-running services and execute specific tasks to streamline your development workflow. Understand execution options, dependencies, and best practices for efficient environment management.
Basic configuration
When an environment is created the system loads Automations from the default file: .gitpod/automations.yaml
relative to your repository root. You can change this location using Projects. An automations.yaml
consists of services and tasks defined at the root level, for example:
Services and tasks are a map where the key serves as reference for the corresponding item. When looking at task dependencies their use becomes clear.
See reference for a full example.
Services in the automations.yaml
Example workflow:
Tasks in the automations.yaml
Example workflow:
Iterating on Automations
You can iterate on Automations using the CLI which is available by default in every Gitpod environment. The CLI can
- reload the Automations file using:
- start a task or service:
- Simulate an environment trigger:
Using Automations outside of an environment
The CLI commands to interact with an environment’s Automations are also available outside of an environment. The following snippet brings up an environment, adds a task, runs it, waits for the task to complete and brings the environment back down again:
Was this page helpful?