You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zk...@apache.org on 2023/11/10 07:44:16 UTC

(incubator-devlake-website) branch main updated: docs: update GitHub and GitLab CI/CD configuration (#679)

This is an automated email from the ASF dual-hosted git repository.

zky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 1390868670 docs: update GitHub and GitLab CI/CD configuration (#679)
1390868670 is described below

commit 1390868670ececbf602fb1f108371da80926620b
Author: Louis.z <lo...@gmail.com>
AuthorDate: Fri Nov 10 15:44:11 2023 +0800

    docs: update GitHub and GitLab CI/CD configuration (#679)
    
    * docs: update GitHub deployment config
    
    * docs: update GitHub deploy config for v0.18/0.19
    
    * docs: update GitLab deploy config for v0.18/0.19
    
    * docs: update GitHub deploy config
    
    ---------
    
    Co-authored-by: Startrekzky <ka...@merico.dev>
---
 docs/Configuration/GitHub.md                       |  18 ++++++++----------
 docs/Configuration/GitLab.md                       |  13 +++++++------
 .../images/github-set-transformation2.png          | Bin 563178 -> 181847 bytes
 .../version-v0.18/Configuration/GitHub.md          |  14 ++++----------
 .../version-v0.18/Configuration/GitLab.md          |  13 ++++++-------
 .../version-v0.19/Configuration/GitHub.md          |  14 ++++----------
 .../version-v0.19/Configuration/GitLab.md          |  13 ++++++-------
 7 files changed, 35 insertions(+), 50 deletions(-)

diff --git a/docs/Configuration/GitHub.md b/docs/Configuration/GitHub.md
index d451050f25..2b827ec8a4 100644
--- a/docs/Configuration/GitHub.md
+++ b/docs/Configuration/GitHub.md
@@ -125,22 +125,20 @@ Scope config contains two parts:
 
 #### CI/CD
 
-This set of configurations is used for calculating [DORA metrics](../DORA.md).
+This set of configurations is used to define 'deployments'. Deployments are related to measure [DORA metrics](../DORA.md).
 
-If you're using GitHub Action to conduct `deployments`, please select "Detect Deployment from Jobs in GitHub Action", and input the RegEx in the following fields:
+For GitHub deployments, DevLake recognizes them as deployments by specifying a regular expression (regex) to identify the production environments among all 'GitHub environments'.
 
-- Deployment: A GitHub Action job with a name that matches the given regEx will be considered as a deployment.
-- Production: A GitHub Action job with a name that matches the given regEx will be considered a job in the production environment.
+If your deployments are not performed through GitHub deployments but rather specific workflow runs in GitHub, you have the option to convert a workflow run into a DevLake deployment. In this case, you need to configure two regular expressions (regex):
+
+- Deployment: The given regex should match the name of the GitHub workflow run or one of its jobs to be considered as a deployment. For example, if the workflow run used for deployment is named 'build-and-push-image', you can input (push-image). To make the regex case insensitive, you can include (?i) before the regex.
+- Production: The given regex should match either the workflow run's name or its branch's name to be considered a deployment within the production environment. For instance:
+  - If the workflow run used for deployment is named 'build-to-prod', you can input (prod). To make the regex case insensitive, you can include (?i) before the regex.
+  - Also, many users in GitHub utilize the same workflow for both staging and prod deployments, executing it on the release branch would indicate a production deployment.
 
-A GitHub workflow run has many jobs. Each GitHub workflow run is converted to a 
-cicd_pipeline in the domain layer and each GitHub Action job is converted to a cicd_task in the domain layer.
 ![github-action-run](/img/ConfigUI/github-action-run.png)
 ![github-action-job](/img/ConfigUI/github-action-job.png)
 
-The deployment and production regex is always applied to the records in the cicd_tasks table.
-
-You can also select "Not using Jobs in GitHub Action as Deployments" if you're not using GitHub action to conduct deployments.
-
 #### Code Review
 
 - Type: The `type` of pull requests will be parsed from PR labels by given regular expression. For example:
diff --git a/docs/Configuration/GitLab.md b/docs/Configuration/GitLab.md
index 14224cb438..80c465da70 100644
--- a/docs/Configuration/GitLab.md
+++ b/docs/Configuration/GitLab.md
@@ -90,15 +90,16 @@ Scope config contains two parts:
 
 #### CI/CD
 
-This set of configurations is used for calculating [DORA metrics](../DORA.md).
+This set of configurations is used to define 'deployments'. Deployments are related to measure [DORA metrics](../DORA.md).
 
-If you're using GitLab CI to conduct `deployments`, please select "Detect Deployment from Jobs in GitLab CI", and input the RegEx in the following fields:
+For GitLab deployments, DevLake recognizes them as deployments by specifying a regular expression (regex) to identify the production environments among all 'GitLab environments'.
 
-- Deployment: The name of the GitLab pipeline or one of its jobs matches the given regEx will be considered as a deployment.
-- Production: If the name also matches the PRODUCTION regEx, the deployment will be considered a PRODUCTION deployment.
-
-By the above two fields, DevLake can identify a production deployment among massive GitLab CI pipelines.
+If your deployments are not performed through GitLab deployments but rather specific pipelines in GitLab, you have the option to convert a GitLab pipeline run into a DevLake deployment. In this case, you need to configure two regular expressions (regex):
 
+- Deployment: The given regex should match the name of the GitLab pipeline's branch name or one of its job names to be considered as a deployment. For example, if the pipeline is executet on the 'build-and-push-image', you can input (push-image). To make the regex case insensitive, you can include (?i) before the regex.
+- Production: The given regex should match either the pipeline's branch name or one of its job names to be considered a deployment within the production environment. For instance:
+  - If the pipeline used for deployment is named 'build-to-prod', you can input (prod). To make the regex case insensitive, you can include (?i) before the regex.
+  - Also, many users in GitLab utilize the same pipeline for both staging and prod deployments, executing it on the release branch would indicate a production deployment.
 
 ## Step 2 - Collect Data in a Project
 ### Step 2.1 - Create a Project
diff --git a/docs/Configuration/images/github-set-transformation2.png b/docs/Configuration/images/github-set-transformation2.png
index fc51dae334..c079a5f3a6 100644
Binary files a/docs/Configuration/images/github-set-transformation2.png and b/docs/Configuration/images/github-set-transformation2.png differ
diff --git a/versioned_docs/version-v0.18/Configuration/GitHub.md b/versioned_docs/version-v0.18/Configuration/GitHub.md
index cfe3b1f39a..a4cf8c737d 100644
--- a/versioned_docs/version-v0.18/Configuration/GitHub.md
+++ b/versioned_docs/version-v0.18/Configuration/GitHub.md
@@ -125,22 +125,16 @@ Scope config contains two parts:
 
 #### CI/CD
 
-This set of configurations is used for calculating [DORA metrics](../DORA.md).
+This set of configurations is used to define 'deployments'. Deployments are related to measure [DORA metrics](../DORA.md).
 
-If you're using GitHub Action to conduct `deployments`, please select "Detect Deployment from Jobs in GitHub Action", and input the RegEx in the following fields:
+DevLake will convert a workflow run into a DevLake deployment by specifying two regular expressions (regex):
 
-- Deployment: A GitHub Action job with a name that matches the given regEx will be considered as a deployment.
-- Production: A GitHub Action job with a name that matches the given regEx will be considered a job in the production environment.
+- Deployment: The given regex should match the name of the GitHub workflow run or one of its jobs to be considered as a deployment. For example, if the workflow run used for deployment is named 'build-and-push-image', you can input (push-image). To make the regex case insensitive, you can include (?i) before the regex.
+- Production: The given regex should match the workflow run's name to be considered a deployment within the production environment. For example, if the workflow run used for deployment is named 'build-to-prod', you can input (prod). To make the regex case insensitive, you can include (?i) before the regex.
 
-A GitHub workflow run has many jobs. Each GitHub workflow run is converted to a 
-cicd_pipeline in the domain layer and each GitHub Action job is converted to a cicd_task in the domain layer.
 ![github-action-run](/img/ConfigUI/github-action-run.png)
 ![github-action-job](/img/ConfigUI/github-action-job.png)
 
-The deployment and production regex is always applied to the records in the cicd_tasks table.
-
-You can also select "Not using Jobs in GitHub Action as Deployments" if you're not using GitHub action to conduct deployments.
-
 #### Code Review
 
 - Type: The `type` of pull requests will be parsed from PR labels by given regular expression. For example:
diff --git a/versioned_docs/version-v0.18/Configuration/GitLab.md b/versioned_docs/version-v0.18/Configuration/GitLab.md
index 5142d607e0..d73cc22d0e 100644
--- a/versioned_docs/version-v0.18/Configuration/GitLab.md
+++ b/versioned_docs/version-v0.18/Configuration/GitLab.md
@@ -90,15 +90,14 @@ Scope config contains two parts:
 
 #### CI/CD
 
-This set of configurations is used for calculating [DORA metrics](../DORA.md).
+This set of configurations is used to define 'deployments'. Deployments are related to measure [DORA metrics](../DORA.md).
 
-If you're using GitLab CI to conduct `deployments`, please select "Detect Deployment from Jobs in GitLab CI", and input the RegEx in the following fields:
-
-- Deployment: The name of the GitLab pipeline or one of its jobs matches the given regEx will be considered as a deployment.
-- Production: If the name also matches the PRODUCTION regEx, the deployment will be considered a PRODUCTION deployment.
-
-By the above two fields, DevLake can identify a production deployment among massive GitLab CI pipelines.
+DevLake will convert a GitLab pipeline into a DevLake deployment by specifying two regular expressions (regex):
 
+- Deployment: The given regex should match the name of the GitLab pipeline's branch name or one of its job names to be considered as a deployment. For example, if the pipeline is executet on the 'build-and-push-image', you can input (push-image). To make the regex case insensitive, you can include (?i) before the regex.
+- Production: The given regex should match either the pipeline's branch name or one of its job names to be considered a deployment within the production environment. For instance:
+  - If the pipeline used for deployment is named 'build-to-prod', you can input (prod). To make the regex case insensitive, you can include (?i) before the regex.
+  - Also, many users in GitLab utilize the same pipeline for both staging and prod deployments, executing it on the release branch would indicate a production deployment.
 
 ## Step 2 - Collect Data in a Project
 ### Step 2.1 - Create a Project
diff --git a/versioned_docs/version-v0.19/Configuration/GitHub.md b/versioned_docs/version-v0.19/Configuration/GitHub.md
index cfe3b1f39a..a4cf8c737d 100644
--- a/versioned_docs/version-v0.19/Configuration/GitHub.md
+++ b/versioned_docs/version-v0.19/Configuration/GitHub.md
@@ -125,22 +125,16 @@ Scope config contains two parts:
 
 #### CI/CD
 
-This set of configurations is used for calculating [DORA metrics](../DORA.md).
+This set of configurations is used to define 'deployments'. Deployments are related to measure [DORA metrics](../DORA.md).
 
-If you're using GitHub Action to conduct `deployments`, please select "Detect Deployment from Jobs in GitHub Action", and input the RegEx in the following fields:
+DevLake will convert a workflow run into a DevLake deployment by specifying two regular expressions (regex):
 
-- Deployment: A GitHub Action job with a name that matches the given regEx will be considered as a deployment.
-- Production: A GitHub Action job with a name that matches the given regEx will be considered a job in the production environment.
+- Deployment: The given regex should match the name of the GitHub workflow run or one of its jobs to be considered as a deployment. For example, if the workflow run used for deployment is named 'build-and-push-image', you can input (push-image). To make the regex case insensitive, you can include (?i) before the regex.
+- Production: The given regex should match the workflow run's name to be considered a deployment within the production environment. For example, if the workflow run used for deployment is named 'build-to-prod', you can input (prod). To make the regex case insensitive, you can include (?i) before the regex.
 
-A GitHub workflow run has many jobs. Each GitHub workflow run is converted to a 
-cicd_pipeline in the domain layer and each GitHub Action job is converted to a cicd_task in the domain layer.
 ![github-action-run](/img/ConfigUI/github-action-run.png)
 ![github-action-job](/img/ConfigUI/github-action-job.png)
 
-The deployment and production regex is always applied to the records in the cicd_tasks table.
-
-You can also select "Not using Jobs in GitHub Action as Deployments" if you're not using GitHub action to conduct deployments.
-
 #### Code Review
 
 - Type: The `type` of pull requests will be parsed from PR labels by given regular expression. For example:
diff --git a/versioned_docs/version-v0.19/Configuration/GitLab.md b/versioned_docs/version-v0.19/Configuration/GitLab.md
index 41ac6d2be1..18319fc3e4 100644
--- a/versioned_docs/version-v0.19/Configuration/GitLab.md
+++ b/versioned_docs/version-v0.19/Configuration/GitLab.md
@@ -90,15 +90,14 @@ Scope config contains two parts:
 
 #### CI/CD
 
-This set of configurations is used for calculating [DORA metrics](../DORA.md).
+This set of configurations is used to define 'deployments'. Deployments are related to measure [DORA metrics](../DORA.md).
 
-If you're using GitLab CI to conduct `deployments`, please select "Detect Deployment from Jobs in GitLab CI", and input the RegEx in the following fields:
-
-- Deployment: The name of the GitLab pipeline or one of its jobs matches the given regEx will be considered as a deployment.
-- Production: If the name also matches the PRODUCTION regEx, the deployment will be considered a PRODUCTION deployment.
-
-By the above two fields, DevLake can identify a production deployment among massive GitLab CI pipelines.
+DevLake will convert a GitLab pipeline into a DevLake deployment by specifying two regular expressions (regex):
 
+- Deployment: The given regex should match the name of the GitLab pipeline's branch name or one of its job names to be considered as a deployment. For example, if the pipeline is executet on the 'build-and-push-image', you can input (push-image). To make the regex case insensitive, you can include (?i) before the regex.
+- Production: The given regex should match either the pipeline's branch name or one of its job names to be considered a deployment within the production environment. For instance:
+  - If the pipeline used for deployment is named 'build-to-prod', you can input (prod). To make the regex case insensitive, you can include (?i) before the regex.
+  - Also, many users in GitLab utilize the same pipeline for both staging and prod deployments, executing it on the release branch would indicate a production deployment.
 
 ## Step 2 - Collect Data in a Project
 ### Step 2.1 - Create a Project