explicitly "unmap" GitHub deployment environments

Florian Koch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2024

Through the .jira/config.yml file it is possible to create an explicit deployment environment mapping. My issue is that we (for technical reasons) have some deployment environments that are not actually used for a real deployment, so Jira should not pick them up (especially on failures).

So I've created a config.yml file as specified, which works as one of our environments with a non-standard name is now correctly picked up. However, it's not possible to explicitly "unmap" the environments. I've checked the code, if the globs in the file don't match the name it just falls back to using the default matcher, instead of categorizing the deployment as unmapped (see https://github.com/atlassian/github-for-jira/blob/main/src/transforms/transform-deployment.ts#L251). Also it is not possible to include an explicit glob for unmapped, only valid environments are considered.

This eliminates the possibility to actively ignore deployment environments which have names matching the original pattern (in our case "prd-approval", "tst-approval") and fills our deployments view in Jira with false positives.

1 answer

1 accepted

0 votes
Answer accepted
Florian Koch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 29, 2024

Actually checking the code in detail it should be possible to add any kind of environment name with additional globs to achieve the "unmapping".

This is how it now looks like ("ignore" can actually be any string that is not part of the four known environments):

deployments:
environmentMapping:
development:
- "dev"
- "branch-deployment"
testing:
- "tst"
production:
- "prd"
ignore:
- "*-vars"
- "*-approval"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events