Build Stages
Last updated
Was this helpful?
Last updated
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:
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.
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.