Gallery
  • Introduction to Gallery
  • Getting Started
    • Link Your Cloud Provider
    • Create a Template
    • Build an Environment
  • Cloud Integrations
    • AWS
    • GCP
    • Other Cloud Providers
  • Gallery CLI
    • Setup
      • Installation
      • Authentication
  • Build System
    • Overview
    • Project Builds
      • Build Jobs
      • Build Stages
      • .gallery-deploy.yml Docs
    • Terraform
      • Variables
      • Mapping URLs/Configs
      • Using Cached Services
  • Cached Services
    • Overview
    • Defining Cached Services
  • Examples
    • Flask Elastic Beanstalk Quickstart
  • Resources
    • Environments
      • Managing your Environments
      • Environment Teardown
      • Environment Settings
Powered by GitBook
On this page
  • Pre-Infrastructure Stages
  • Post-Infrastructure Stages

Was this helpful?

  1. Build System
  2. Project Builds

Build Stages

PreviousBuild JobsNext.gallery-deploy.yml Docs

Last updated 3 years ago

Was this helpful?

Gallery jobs are grouped into parallelizable stages. There are two types of stages, pre-infra (init_stages) and post-infra (infra_stages) stages, which have slightly different roles. Define these stages at the top of the .gallery-deploy.yml file:

init_stages:
    - build
infra_stages:
    - deploy

Pre-Infrastructure Stages

Pre-infrastructure stages can be used to build code that will be used by the infrastructure deployment steps. For example, if you need to deploy a docker image to a managed instance group in a terraform file, you'll need to build the image in the pre-infrastructure stage.

Post-Infrastructure Stages

Some providers don't have great support for deploying built code directly using terraform, and you may have to deploy artifacts on top of the infrastructure after it is created. You can use post-infrastructure stages to do this -- you'll have access to in these stages to give you information on the created infrastructure.

environment variable mappers