We are using templates for deploy pipeline. We have 3 environments where we want to deploy. Problem we are facing is triggering of pipeline.
Ideal scenario would be to automatic deploy to dev environment where we run API level functional tests after deploy and manually deploy to UAT and production when we are satisfied with manual and automatic testing results.
Deploy pipelines are same and we create them from template with environment name as parameter. Is there a way to tell GO CD to conditionally start a pipeline build from template (something like if dev start automatic else start manual
in meta language)?
If you can have environment name as environment variable instead of parameter, you can trigger your deploy pipeline using pipeline api. So you can keep your deploy pipeline in manual trigger mode and have another pipeline which can poll for changes and automatically trigger the pipeline api for your dev environment deployment. For UAT and production environment you can use the templatised pipeline with manual trigger. I don't think we can control the trigger based on a parameter or an environment variable.