dosubot[bot] commented on issue #8348: URL: https://github.com/apache/incubator-devlake/issues/8348#issuecomment-2740142835
<!-- Greeting --> Hi @Bermos! I'm here to help with any bugs, questions, or contributions you have. Let's tackle this together! <!-- Answer --> I found a similar closed issue regarding the configuration of deployment environments. The issue was titled "[Feature][DORA] Allow users to configure the environment of deployments by other attributes rather than 'job/build name'" but no solution was found in the comments <sup>[[1]](https://github.com/apache/incubator-devlake/issues/3609)</sup>. Currently, the environment is set to 'PRODUCTION' using a regex pattern match in the codebase. Specifically, if the `data.RegexEnricher` is not nil and the `ReturnNameIfMatched` method matches the `devops.ENV_NAME_PATTERN` with `gitlabDeployment.Environment`, then `domainDeployCommit.Environment` is set to `devops.PRODUCTION` <sup>[[2]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitlab/tasks/deployment_convertor.go)</sup>. There are existing configuration options that could be leveraged to specify different deployment environments. For BitBucket, the deployment environment can be specified using the `deployment` key in the BitBucket CI .yml file. For GitHub, deployments can be recognized by specifying a regex to identify production environments among all 'GitHub environments' <sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.16/Configuration/BitBucket.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Configuration/BitBucket.md)</sup><sup>[[5]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Configuration/GitHub.md)</sup>. If you plan to contribute code to support tracking multiple environments, you might need to update or expand existing tests related to deployment environments, such as those in the `backend/plugins/bitbucket/e2e/deployments_test.go` file <sup>[[6]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/bitbucket/e2e/deployments_test.go)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/234120ad-a65c-40a6-bed7-f010b5905fe4?feedback_type=other)</sup> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org