Skip to content

Commit

Permalink
feat(jira): added environment mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
YunaBraska committed Oct 14, 2024
1 parent 97cbe20 commit 2d12c8b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .jira/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 🌍 Jira Environment Mapping for Deployments

_see
also: [Environment Mapping Docs](https://github.com/atlassian/github-for-jira/blob/main/docs/deployments.md#environment-mapping)_

This repo uses `.jira/config.yml` to map deployment environments in Jira tickets, making sure Jira recognizes the
correct environment type.

## 🚀 How it works:

1️⃣ **Jira listens** to GitHub deployment events and checks the `environment name`.
2️⃣ **Jira reads** the issue keys from commit messages (e.g., `JIRA-123`).
3️⃣ **Jira maps** the environment name to a type (e.g., `development`, `testing`, `staging`, `production`) based on
`.jira/config.yml` in the `main` branch. and updates the ticket.
20 changes: 20 additions & 0 deletions .jira/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
deployments:
environmentMapping:
development:
- "dev"
- "dev-*"
- "development"
- "development-*"
testing:
- "test"
- "test-*"
- "testing"
- "testing-*"
staging:
- "mtp"
- "mtp-*"
production:
- "ps"
- "ps-*"
- "prod"
- "prod-*"

0 comments on commit 2d12c8b

Please sign in to comment.