LogoLogo
  • Welcome to Release
  • Getting started
    • Quickstart
    • Create an account
    • Prepare to use Release
    • Create an application
      • Create custom application
      • Create from template
      • Servers vs runnables
    • Create an environment
  • Guides and examples
    • Domains and DNS
      • Manage domains
      • DNS and nameservers
        • Configure GoDaddy
        • Configure Cloudflare
        • Configure Namecheap
        • Other DNS hosts
      • Routing traffic
    • Example applications
      • Full stack voting app
      • Flask and RDS counter app
      • Static site with Gatsby
      • Golang with Postgres and Nginx
      • WordPress with MySQL
      • Spring and PostgreSQL
      • Terraform and Flask
      • OpenTelemetry demo
      • Load balancer with hostname
      • Static JavaScript service
      • SSH bastion access to services
      • ngrok and OAuth for private tunnels
      • Using OAuth Proxy
      • Hybrid Docker and static site
      • App Imports: Connecting two applications
      • Example library
    • Running instances
      • Cron jobs
      • Jobs
      • Using Helm charts
      • Using terminal
      • Viewing logs
      • Troubleshooting
        • ImagePullBackoff error
        • CrashLoopBackoff error
        • Exit codes
        • OOM: out of memory
    • Advanced guides
      • Containers guide
      • Application guide
      • Kubernetes guide
      • Create a cluster
      • Upgrade a cluster
      • Managing node groups
      • Patch node groups
      • Hostnames and rules
      • Serve traffic on multiple ports
      • Configure access to your K8s cluster
      • Designing for multiple environments
      • Microservices architecture
      • Monitoring your clusters
      • Performance tuning
      • Visibility and monitoring
      • Working with data
        • Container-based data
        • Seeding and migration
        • Cloud-provided data
        • Golden images
        • Third party
      • Pausing Instant Datasets
        • Application pausing schedules
        • Pause/resume environments
      • Infrastructure as code
        • Terraform
  • Reference documentation
    • Account settings
      • Account info
      • Managing users
      • Build settings
        • Build arguments
        • Build SSH keys
      • Add integrations
      • View clusters and cloud integrations
      • Add datasets
      • Environment handles
    • Workflows in Release
      • Stages of workflows
      • Serial deployments
      • Parallel deployments
      • Rolling deployments
      • Rainbow deployments
    • Networking
      • Network architecture (AWS)
      • Network architecture (GCP)
      • Ingresses
      • IP addresses
      • Cloud-provided services
      • Third-party services
    • Release environment versioning
    • Application settings
      • Application Template
        • Schema definition
      • Default environment variables
      • GitHub
      • Pull requests
      • GitOps
      • Just-in-time file mounts
      • Primary App Link
      • Create application FAQ
      • App-level build arguments
      • Parameters
      • Workspaces
      • Triggers
    • End-to-end testing
    • Environment settings
      • Environment configuration
      • Environment variables
        • Environment variable mappings
        • Secrets vaults
        • Using Secrets with GitOps
        • Kubernetes Secrets as environment variables
        • Managing legacy Release Secrets
    • Environment expiration
    • Environment presets
    • Instant datasets on AWS
    • Instant datasets on GCP
    • Instant dataset tasks
      • Tonic Cloud
      • Tonic On-Premise
    • Cloud resources
    • Static service deployment
    • Helm
      • Getting started
      • Version-controlled Helm charts
      • Open-source charts
      • Building Docker images
      • Ingress and networking
      • Configuration
    • GitOps
    • The .release.yaml file
    • Docker Compose conversion support
    • Reference examples
      • Adding and removing services
      • Managing service resources
      • Adding database containers to the Application Template
      • Stock Off-The-Shelf Examples
    • Release API
      • Account Authentication
      • Environments API
        • Create
        • Get
        • Setup
        • Patch
      • User Authentication
      • Environment Presets API
        • Get Environment Preset List
        • Get Environment Preset
        • Put Environment Preset
  • Background concepts
    • How Release works
  • Frequently asked questions
    • Release FAQ
    • AWS FAQ
    • Docker FAQ
    • JavaScript FAQ
  • Integrations
    • Integrations overview
      • Artifactory integration
      • Cloud integrations (AWS)
        • AWS guides
        • Grant access to AWS resources
        • AWS how to increase EIP quota
        • Control your EKS fleet with systems manager
        • Managing STS access
        • AWS Permissions Boundaries
        • Private ECR Repositories
        • Using an Existing AWS VPC
        • Using an Existing EKS Cluster
      • Docker Hub integration
      • LaunchDarkly integration
      • Private registries
      • Slack integration
      • Cloud integrations (GCP)
        • GCP Permissions Boundary
      • Datadog Agent
      • Doppler Secrets Manager
      • AWS Secrets Management
    • Source control integrations
      • GitHub
        • Pull request comments
        • Pull request labels
        • GitHub deployments
        • GitHub statuses
        • Remove GitHub integration
      • Bitbucket
      • GitLab
    • Monitoring and logging add-ons
      • Datadog
      • New Relic
      • ELK (Elasticsearch, Logstash, and Kibana)
  • Release Delivery
    • Create new customer integration
    • Delivery guide
    • Release to customer account access controls
    • Delivery FAQs
  • Release Instant Datasets
    • Introduction
    • Quickstart
    • Security
      • AWS Instant Dataset security
    • FAQ
    • API
  • CLI
    • Getting started
    • Installation
    • Configuration
    • CLI usage example
    • Remote development environments
    • Command reference
      • release accounts
        • release accounts list
        • release accounts select
      • release ai
        • release ai chat
        • release ai config-delete
        • release ai config-init
        • release ai config-select
        • release ai config-upsert
      • release apps
        • release apps list
        • release apps select
      • release auth
        • release auth login
        • release auth logout
      • release builds
        • release builds create
      • release clusters
        • release clusters exec
        • release clusters kubeconfig
        • release clusters shell
      • release datasets
        • release datasets list
        • release datasets refresh
      • release deploys
        • release deploys create
        • release deploys list
      • release development
        • release development logs
        • release development start
      • release environments
        • release environments config-get
        • release environments config-set
        • release environments create
        • release environments delete
        • release environments get
        • release environments list
        • release environments vars-get
      • release gitops
        • release gitops init
        • release gitops validate
      • release instances
        • release instances exec
        • release instances logs
        • release instances terminal
  • Release.ai
    • Release.ai Introduction
    • Getting Started
    • Release.ai Templates
    • Template Configuration Basics
    • Using GPU Resources
    • Custom Workflows
    • Fine Tuning LlamaX
    • Serving Inference
Powered by GitBook
On this page
  • Overview
  • Defining Triggers
  • Basic Structure
  • App-Level vs Environment-Level Triggers
  • Events Reference
  • github.pull_request_labeled
  • github.pull_request_created
  • release.environment_created
  • release.environment_config_changed
  • git.push
  • aws.s3.object_created
  • Actions Reference
  • release.create_environment
  • release.run_workflow
  • Use Cases
  • Automatic Environment Creation for Pull Requests
  • Multi-Repository Deployments
  • Environment-Specific Workflows

Was this helpful?

  1. Reference documentation
  2. Application settings

Triggers

Triggers are currently in limited access preview. Contact the Release support team to request access.

Overview

Release Triggers provide automated responses to events within your development workflow. When specified events occur, such as GitHub pull request labels being added, triggers can automatically execute configurable actions, such as creating new environments or running workflows.

Triggers can be defined at both the app level and environment level within your Application Template, allowing you to create complex automation workflows that respond to your team's development patterns.

Defining Triggers

Basic Structure

Triggers are defined in your Application Template YAML under the triggers section:

triggers:
  app:
    - events:
        - type: github.pull_request_labeled
          label: create-backend-environment
          repo_url: github.com/my-org/frontend
      actions:
        - type: release.create_environment
          app: backend

App-Level vs Environment-Level Triggers

App-Level Triggers (triggers.app) run in the context of the current app and are typically used for creating new environments or performing app-wide actions.

Environment-Level Triggers (triggers.environment) run in the context of a specific environment and have access to environment-specific workflows and configurations.

Events Reference

github.pull_request_labeled

Triggers when a label is added to a GitHub pull request.

Properties

  • label (string, required) - The exact label name that must be added to trigger the event (example: "Create Release Environment")

  • repo_url (string, optional) - The GitHub repository URL. Defaults to the current app's repository

  • branch (string, optional) - Filter to only trigger on specific branches

  • pull_request (string, optional) - Filter to only trigger on specific pull requests (supports "*" wildcard)

Example

events:
  - type: github.pull_request_labeled
    label: create-environment
    repo_url: github.com/myorg/myrepo
    branch: main

github.pull_request_created

Coming soon - this will be implemented in a future release

Triggers when a new GitHub pull request is created.

Properties

  • repo_url - The GitHub repository

  • branch - The pull request's source branch

release.environment_created

Coming soon - this will be implemented in a future release

Triggers when a new Release environment is created.

Properties

  • app - The current app

  • environment - The current environment

release.environment_config_changed

Coming soon - this will be implemented in a future release

Triggers when an environment's configuration is updated.

Properties

  • app - The environment's app

  • environment - The environment's handle

git.push

Coming soon - this will be implemented in a future release

Triggers when code is pushed to a Git repository.

Properties

  • repo_url - The Git repository

  • branch - The branch that was pushed to

  • commit - The commit hash

aws.s3.object_created

Coming soon - this will be implemented in a future release

Triggers when an object is created in an AWS S3 bucket.

Properties

  • aws_account - The AWS account

  • bucket - The S3 bucket name

  • object - The object key

Actions Reference

release.create_environment

Creates a new Release environment.

Parameters

  • app (string, optional) - The app to create an environment for. Defaults to the current app

  • parameters (object, optional) - Parameters to pass to the new environment. Required if the app requires parameters

  • branch (string, optional) - The Git branch to deploy. Defaults to the app's default branch

  • tag (string, optional) - The Git tag to deploy (alternative to branch)

  • workflow (string, optional) - The workflow to run after environment creation. Defaults to "setup"

  • app_imports (array, optional) - App imports configuration. Defaults to the app's configured imports with a branch override. See below for more details.

If app_imports are not specified, we default to the app's current app imports. If the app being created imports the app that defines the trigger and the triggering event includes a branch (e.g. github.pull_request_labeled), we will override the branch in the app import to match the event. This ensures that the code in the branch is what will be deployed in the created environment.

Example

actions:
  - type: release.create_environment
    app: my-api
    branch: feature-branch
    workflow: custom_setup
    parameters:
      database_size: large
      debug_mode: true
    app_imports:
    - name: other-app

release.run_workflow

Coming soon - this will be implemented in a future release

Runs a specific workflow in an environment.

Parameters

  • environment (string, required) - The environment name or handle to run the workflow in. Defaults to the current environment if in an environment trigger.

  • workflow (string, required) - The workflow name to execute

Use Cases

Automatic Environment Creation for Pull Requests

A common workflow is to automatically create preview environments when pull requests are labeled for review:

triggers:
  app:
    - events:
        - type: github.pull_request_labeled
          label: create-environment
      actions:
        - type: release.create_environment

This configuration will create a new environment of the current app using the pull request's branch whenever someone adds the "create-environment" label to a GitHub pull request.

Multi-Repository Deployments

For applications that span multiple repositories, you can create triggers that respond to events in any of the repositories:

triggers:
  app:
    - events:
        - type: github.pull_request_labeled
          label: deploy-frontend
          repo_url: github.com/myorg/frontend-repo
      actions:
        - type: release.create_environment
          app: full-stack-app
    
    - events:
        - type: github.pull_request_labeled
          label: deploy-backend  
          repo_url: github.com/myorg/backend-repo
      actions:
        - type: release.create_environment
          app: full-stack-app

Environment-Specific Workflows

Coming soon - this will be implemented in a future release

Environment-level triggers can run different workflows based on the specific environment context:

triggers:
  environment:
    - events:
        - type: github.pull_request_labeled
          label: run-integration-tests
      actions:
        - type: release.run_workflow
          workflow: integration_tests
    
    - events:
        - type: github.pull_request_labeled
          label: performance-test
      actions:
        - type: release.run_workflow
          workflow: performance_suite
          parameters:
            test_duration: 60m
            load_level: high
PreviousWorkspacesNextEnd-to-end testing

Last updated 1 day ago

Was this helpful?