Only template globs when environment is present

What does this MR do and why?

Only template globs when environment is present

The group+environment glob was not correctly conditioned around the environment being present in the CI job. When the CI job doesn't have an environment, templating of this policy failed.

References

Resolves: #582381 (closed)

Signed-off-by: Alexander Scheel <ascheel@gitlab.com>

Cause

In !210667 (merged), the refactor to ee/app/models/secrets_management/project_secrets_manager.rb introduced a bug when the formatting was changed and this clause was dropped.

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading