Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: enable subtasks by environment variables #745

Merged
merged 2 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/GettingStarted/Authentication.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Security and Authentication"
sidebar_position: 8
sidebar_position: 5
description: How to secure your deployment and enable the Authentication
---

Expand Down
42 changes: 42 additions & 0 deletions docs/GettingStarted/Environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: "Environment Variables"
sidebar_position: 6
description: How to set up environment variables for DevLake
---

This document explains how to set environment variables for Apache DevLake and what environment variables can be set.

## Environment Variables
### ENABLE_SUBTASKS_BY_DEFAULT
This environment variable is used to enable or disable the execution of subtasks.

#### How to set
The format is as follows: plugin_name1:subtask_name1:enabled_value,plugin_name2:subtask_name2:enabled_value,plugin_name3:subtask_name3:enabled_value

Guidance on locating the [plugin_name and subtask_name](https://github.com/apache/incubator-devlake/blob/release-v1.0/backend/plugins/jira/tasks/issue_changelog_collector.go#L41):

- plugin_name: Represents the plugin's name, such as 'jira' for the Jira plugin.
- subtask_name: Denotes the subtask's name, like 'collectIssueChangelogs' for the Jira plugin."

Example 1: Enable some subtasks that are closed by default

```shell
ENABLE_SUBTASKS_BY_DEFAULT="jira:collectIssueChangelogs:true,jira:extractIssueChangelogs:true,jira:convertIssueChangelogs:true,tapd:collectBugChangelogs:true,tapd:extractBugChangelogs:true,tapd:convertBugChangelogs:true,zentao:collectBugRepoCommits:true,zentao:extractBugRepoCommits:true,zentao:convertBugRepoCommits:true,zentao:collectStoryRepoCommits:true,zentao:extractStoryRepoCommits:true,zentao:convertStoryRepoCommits:true,zentao:collectTaskRepoCommits:true,zentao:extractTaskRepoCommits:true,zentao:convertTaskRepoCommits:true"
```

Example 2: Close some subtasks that are executed by default
```shell
ENABLE_SUBTASKS_BY_DEFAULT="github_graphql:Collect Job Runs:false,github_graphql:Extract Job Runs:false,github_graphql:Convert Job Runs:false"
```

#### How to take effect
After setting the environment variable, restart the DevLake service to take effect.
- For Docker Compose, run `docker-compose down` and `docker-compose up -d`.
- For Helm, run `helm upgrade --install devlake apache/devlake`.







2 changes: 1 addition & 1 deletion docs/GettingStarted/Upgrade.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Upgrade"
sidebar_position: 3
sidebar_position: 4
description: How to upgrade your Apache DevLake to a newer version
---

Expand Down
4 changes: 4 additions & 0 deletions docs/Plugins/jira.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Available for Jira Cloud, Sever/Data Center 7.x, 8.x. Check [this doc](https://d

Check out the [Jira entities](/Overview/SupportedDataSources.md#data-collection-scope-by-each-plugin) collected by this plugin.

### How to get more entities
Environment Variables `ENABLE_SUBTASKS_BY_DEFAULT` can be set to enable or disable the execution of subtasks, so that more entities can be collected.
Check [this doc](/GettingStarted/Environment.md#enable_subtasks_by_default) for more details.

## Data Refresh Policy

Check out the [data refresh policy](/Overview/SupportedDataSources.md#jira) of this plugin.
Expand Down
6 changes: 6 additions & 0 deletions docs/Plugins/tapd.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ description: >

This plugin collects TAPD data through its REST APIs. TAPD is an issue-tracking tool similar to Jira.

## Entities
### How to get more entities
Environment Variables `ENABLE_SUBTASKS_BY_DEFAULT` can be set to enable or disable the execution of subtasks, so that more entities can be collected.
Check [this doc](/GettingStarted/Environment.md#enable_subtasks_by_default) for more details.

## Supported Versions
Advanced mode available for Tapd Cloud. Check [this doc](https://devlake.apache.org/docs/Overview/SupportedDataSources#data-sources-and-data-plugins) for more details.

Expand All @@ -25,3 +30,4 @@ Metrics that can be calculated based on the data collected from Tapd:

- Configuring Tapd via [config-ui](/Configuration/Tapd.md).
- Configuring Tapd via Config UI's [advanced mode](/Configuration/AdvancedMode.md#6-tapd).

7 changes: 7 additions & 0 deletions docs/Plugins/zentao.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ description: >

This plugin collects Zentao data through its REST APIs. [Zentao](https://github.com/easysoft/zentaopms) is an issue-tracking tool similar to Jira.

## Entities
### How to get more entities
Environment Variables `ENABLE_SUBTASKS_BY_DEFAULT` can be set to enable or disable the execution of subtasks, so that more entities can be collected.
Check [this doc](/GettingStarted/Environment.md#enable_subtasks_by_default) for more details.

## Supported Versions

Advanced mode vailable for Zentao OSS v18.3, Enterprise v8.2, Flagship v4.3. Check [this doc](https://devlake.apache.org/docs/Overview/SupportedDataSources#data-sources-and-data-plugins) for more details.
Expand All @@ -26,3 +31,5 @@ Metrics that can be calculated based on the data collected from Zentao:

- Configuring Zentao via [config-ui](/Configuration/Zentao.md).
- Configuring Zentao via Config UI's [advanced mode](/Configuration/AdvancedMode.md#8-zentao).