Google Cloud Deploy supports multi targets by creating a child target. However the profiles configuration is a part of the pipeline config so during rendering the profiles go missing.
e.g. let us assume I have a web-server and a jobs-server that I want to deploy in parallel. The following config sort of works
apiVersion: deploy.cloud.google.com/v1
kind: DeliveryPipeline
metadata:
name: parallel-deploy-example
description: Parallel deploy Example
serialPipeline:
stages:
- targetId: all-servers
profiles: [profile1, profile2]
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name: all-servers
description: Deploy all servers
multiTarget:
targetIds:
- web-server
- jobs-server
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name: web-server
labels:
service-type: web server
description: staging web us-central1
run:
location: projects/something/locations/us-central1
---
apiVersion: deploy.cloud.google.com/v1
kind: Target
metadata:
name: jobs-server
labels:
service-type: jobs
description: jobs server
run:
location: projects/something/locations/us-central1
Now While I can pass profile1 profile2 to both servers I can't pass a profile specifically for web-server and a different profile for jobs server.
However when doing it serially since each step has a profiles array I can give them their own profile.
Is there some secret config I am missing or is this a limitation I have to live with.
Hello @roopakv ,
Attaching here the limitation documentation that you can check for reference. For your concern, with the provided configuration partially works, it doesn't allow assigning specific profiles to individual child targets.
As a workaround you can try:
We are also interested in using different profiles for different parallel targets in a pipeline.
@dionv can you please expand on suggestion 2 a bit? How do we do conditional logic within a Cloud Deploy pipeline?