diff --git a/content/en/docs/devops-user-guide/how-to-use/pipeline-webhook.md b/content/en/docs/devops-user-guide/how-to-use/pipeline-webhook.md index efaf3a4c9..3b69f5757 100644 --- a/content/en/docs/devops-user-guide/how-to-use/pipeline-webhook.md +++ b/content/en/docs/devops-user-guide/how-to-use/pipeline-webhook.md @@ -1,19 +1,19 @@ --- -title: "Trigger a Pipeline via a Webhook" +title: "Trigger a Pipeline by Using a Webhook" keywords: 'Kubernetes, DevOps, Jenkins, Pipeline, Webhook' -description: 'Learn how to trigger a Jenkins pipeline via a webhook.' -linkTitle: "Trigger a Pipeline via a Webhook" +description: 'Learn how to trigger a Jenkins pipeline by using a webhook.' +linkTitle: "Trigger a Pipeline by Using a Webhook" weight: 11293 --- -If you create a Jenkinsfile-based pipeline from a remote code repository, you can configure a webhook in the remote repository so that the pipeline will be automatically triggered when changes are made to the remote repository. +If you create a Jenkinsfile-based pipeline from a remote code repository, you can configure a webhook in the remote repository so that the pipeline is automatically triggered when changes are made to the remote repository. -This tutorial demonstrates how to trigger a pipeline via a webhook. +This tutorial demonstrates how to trigger a pipeline by using a webhook. ## Prerequisites - You need to [enable the KubeSphere DevOps system](../../../pluggable-components/devops/). -- You need to create a workspace, a DevOps project, and an account (`project-regular`). This account needs to be invited to the DevOps project with the `operator` role. See [Create Workspaces, Projects, Accounts and Roles](../../../quick-start/create-workspace-and-project/) if they are not ready. +- You need to create a workspace, a DevOps project, and an account (`project-regular`). This account needs to be invited to the DevOps project and assigned the `operator` role. See [Create Workspaces, Projects, Accounts and Roles](../../../quick-start/create-workspace-and-project/) if they are not ready. - You need to create a Jenkinsfile-based pipeline from a remote code repository. For more information, see [Create a Pipeline Using a Jenkinsfile](../create-a-pipeline-using-jenkinsfile/). @@ -27,19 +27,19 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![edit-config](/images/docs/devops-user-guide/using-devops/pipeline-webhook/edit-config.png) -3. In the displayed dialog box, scroll down to **Webhook Push** and you can see the webhook push URL. +3. In the displayed dialog box, scroll down to **Webhook Push** to obtain the webhook push URL. ![webhook-push](/images/docs/devops-user-guide/using-devops/pipeline-webhook/webhook-push.png) ### Set a webhook in the GitHub repository -1. Log in to your GitHub and go to your own repository `devops-java-sample`. +1. Log in to GitHub and go to your own repository `devops-java-sample`. -2. Click **Settings**, click **Webhooks**, and then click **Add webhook**. +2. Click **Settings**, click **Webhooks**, and click **Add webhook**. ![click-add-webhook](/images/docs/devops-user-guide/using-devops/pipeline-webhook/click-add-webhook.png) -3. Enter the Webhook Push URL of the pipeline for **Payload URL** and click **Add webhook**. This tutorial selects **Just the push event** for demonstration purposes. You can make other settings based on your needs. For more information, see [the GitHub document](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks). +3. Enter the webhook push URL of the pipeline for **Payload URL** and click **Add webhook**. This tutorial selects **Just the push event** for demonstration purposes. You can make other settings based on your needs. For more information, see [the GitHub document](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks). ![add-webhook](/images/docs/devops-user-guide/using-devops/pipeline-webhook/add-webhook.png) @@ -47,9 +47,9 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![webhook-ready](/images/docs/devops-user-guide/using-devops/pipeline-webhook/webhook-ready.png) -## Trigger the Pipeline via the Webhook +## Trigger the Pipeline by Using the Webhook -### Submit a Pull Request to the repository +### Submit a pull request to the repository 1. On the **Code** page of your own repository, click **master** and then select **sonarqube**. @@ -63,7 +63,7 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![edit-file](/images/docs/devops-user-guide/using-devops/pipeline-webhook/edit-file.png) -4. When you finish, click **Commit changes** at the bottom of the page. +4. Click **Commit changes** at the bottom of the page. ### Check the webhook deliveries @@ -71,7 +71,7 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![webhook-ready](/images/docs/devops-user-guide/using-devops/pipeline-webhook/webhook-ready.png) -2. Click **Recent Deliveries** and you can click a specific delivery record to view its details. +2. Click **Recent Deliveries** and click a specific delivery record to view its details. ![delivery-detail](/images/docs/devops-user-guide/using-devops/pipeline-webhook/delivery-detail.png) @@ -79,11 +79,11 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. 1. Log in to the KubeSphere web console as `project-regular`. Go to your DevOps project and click the pipeline. -2. On the **Activity** tab, you can see that a new run is triggered due to a Pull Request is submitted to the `sonarqube` branch of the remote repository. +2. On the **Activity** tab, check that a new run is triggered by the pull request submitted to the `sonarqube` branch of the remote repository. ![pipeline-triggered](/images/docs/devops-user-guide/using-devops/pipeline-webhook/pipeline-triggered.png) -3. After a while, the pipeline runs successfully. On the **Pods** page the project `kubesphere-sample-dev`, you can see that 3 Pods are running. +3. Go to the **Pods** page of the project `kubesphere-sample-dev` and check the status of the 3 Pods. If the status of the 3 Pods is running, the pipeline is running properly. ![pods](/images/docs/devops-user-guide/using-devops/pipeline-webhook/pods.png) diff --git a/content/zh/docs/devops-user-guide/how-to-use/pipeline-webhook.md b/content/zh/docs/devops-user-guide/how-to-use/pipeline-webhook.md index efaf3a4c9..3b69f5757 100644 --- a/content/zh/docs/devops-user-guide/how-to-use/pipeline-webhook.md +++ b/content/zh/docs/devops-user-guide/how-to-use/pipeline-webhook.md @@ -1,19 +1,19 @@ --- -title: "Trigger a Pipeline via a Webhook" +title: "Trigger a Pipeline by Using a Webhook" keywords: 'Kubernetes, DevOps, Jenkins, Pipeline, Webhook' -description: 'Learn how to trigger a Jenkins pipeline via a webhook.' -linkTitle: "Trigger a Pipeline via a Webhook" +description: 'Learn how to trigger a Jenkins pipeline by using a webhook.' +linkTitle: "Trigger a Pipeline by Using a Webhook" weight: 11293 --- -If you create a Jenkinsfile-based pipeline from a remote code repository, you can configure a webhook in the remote repository so that the pipeline will be automatically triggered when changes are made to the remote repository. +If you create a Jenkinsfile-based pipeline from a remote code repository, you can configure a webhook in the remote repository so that the pipeline is automatically triggered when changes are made to the remote repository. -This tutorial demonstrates how to trigger a pipeline via a webhook. +This tutorial demonstrates how to trigger a pipeline by using a webhook. ## Prerequisites - You need to [enable the KubeSphere DevOps system](../../../pluggable-components/devops/). -- You need to create a workspace, a DevOps project, and an account (`project-regular`). This account needs to be invited to the DevOps project with the `operator` role. See [Create Workspaces, Projects, Accounts and Roles](../../../quick-start/create-workspace-and-project/) if they are not ready. +- You need to create a workspace, a DevOps project, and an account (`project-regular`). This account needs to be invited to the DevOps project and assigned the `operator` role. See [Create Workspaces, Projects, Accounts and Roles](../../../quick-start/create-workspace-and-project/) if they are not ready. - You need to create a Jenkinsfile-based pipeline from a remote code repository. For more information, see [Create a Pipeline Using a Jenkinsfile](../create-a-pipeline-using-jenkinsfile/). @@ -27,19 +27,19 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![edit-config](/images/docs/devops-user-guide/using-devops/pipeline-webhook/edit-config.png) -3. In the displayed dialog box, scroll down to **Webhook Push** and you can see the webhook push URL. +3. In the displayed dialog box, scroll down to **Webhook Push** to obtain the webhook push URL. ![webhook-push](/images/docs/devops-user-guide/using-devops/pipeline-webhook/webhook-push.png) ### Set a webhook in the GitHub repository -1. Log in to your GitHub and go to your own repository `devops-java-sample`. +1. Log in to GitHub and go to your own repository `devops-java-sample`. -2. Click **Settings**, click **Webhooks**, and then click **Add webhook**. +2. Click **Settings**, click **Webhooks**, and click **Add webhook**. ![click-add-webhook](/images/docs/devops-user-guide/using-devops/pipeline-webhook/click-add-webhook.png) -3. Enter the Webhook Push URL of the pipeline for **Payload URL** and click **Add webhook**. This tutorial selects **Just the push event** for demonstration purposes. You can make other settings based on your needs. For more information, see [the GitHub document](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks). +3. Enter the webhook push URL of the pipeline for **Payload URL** and click **Add webhook**. This tutorial selects **Just the push event** for demonstration purposes. You can make other settings based on your needs. For more information, see [the GitHub document](https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks). ![add-webhook](/images/docs/devops-user-guide/using-devops/pipeline-webhook/add-webhook.png) @@ -47,9 +47,9 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![webhook-ready](/images/docs/devops-user-guide/using-devops/pipeline-webhook/webhook-ready.png) -## Trigger the Pipeline via the Webhook +## Trigger the Pipeline by Using the Webhook -### Submit a Pull Request to the repository +### Submit a pull request to the repository 1. On the **Code** page of your own repository, click **master** and then select **sonarqube**. @@ -63,7 +63,7 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![edit-file](/images/docs/devops-user-guide/using-devops/pipeline-webhook/edit-file.png) -4. When you finish, click **Commit changes** at the bottom of the page. +4. Click **Commit changes** at the bottom of the page. ### Check the webhook deliveries @@ -71,7 +71,7 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. ![webhook-ready](/images/docs/devops-user-guide/using-devops/pipeline-webhook/webhook-ready.png) -2. Click **Recent Deliveries** and you can click a specific delivery record to view its details. +2. Click **Recent Deliveries** and click a specific delivery record to view its details. ![delivery-detail](/images/docs/devops-user-guide/using-devops/pipeline-webhook/delivery-detail.png) @@ -79,11 +79,11 @@ This tutorial demonstrates how to trigger a pipeline via a webhook. 1. Log in to the KubeSphere web console as `project-regular`. Go to your DevOps project and click the pipeline. -2. On the **Activity** tab, you can see that a new run is triggered due to a Pull Request is submitted to the `sonarqube` branch of the remote repository. +2. On the **Activity** tab, check that a new run is triggered by the pull request submitted to the `sonarqube` branch of the remote repository. ![pipeline-triggered](/images/docs/devops-user-guide/using-devops/pipeline-webhook/pipeline-triggered.png) -3. After a while, the pipeline runs successfully. On the **Pods** page the project `kubesphere-sample-dev`, you can see that 3 Pods are running. +3. Go to the **Pods** page of the project `kubesphere-sample-dev` and check the status of the 3 Pods. If the status of the 3 Pods is running, the pipeline is running properly. ![pods](/images/docs/devops-user-guide/using-devops/pipeline-webhook/pods.png)