Hi,
Cloud Deploy Policy is not accepting regex for Pipeline ID and Target ID. It is able to apply the prepared yaml and showing correct regex but it is not applying the policy. Below is the snippet of the selectors from deploy policy.
selectors:
- deliveryPipeline:
id: '*-deploy'
target:
id: '*-cl2'
Based on this configuration, the policy should be applied on all delivery pipelines ending with '-deploy' and targets ending with '-cl2'' which is not working. If exact values are provided then it worked.
Hi @mhaziq,
It appears that a more thorough investigation of your project is necessary. For more detailed insights you may reach out to Google Cloud Support for assistance.
Hi @mhaziq, the `id` field of a automations and policy selectors do no support wildcarding. The `*` field is only allowed on its own to match all pipelines/targets, but things like `*-prod` don't do what you'd expect. This could definitely be more clear. I'll file a bug to
Furthermore I'll file a feature request to support more wildcarding options, and we'll consider supporting that.
In the meantime, perhaps you could use labels to achieve a similar effect? For example, if prod targets are labeled with `env: prod`, you could then have a policy that matched that label.
Thanks for the feedback! (And sorry for the delay responding.)