Updated on 2023-07-25 GMT+08:00

Detailed Description of Pipeline Gate

Pipeline gate supports only merge requests whose merge mechanism is Approval.

Opening/Closing the Gate

  1. Go to the target repository and choose Settings > Policy Settings > Merge Requests.
  2. Click Create to set a branch policy for the target branch.
  3. Configure the gate.

    • Select Enable pipeline gate under the policy and click OK to save the settings. The gate is enabled.
    • Deselect Enable pipeline gate under the policy and click OK to save the settings. The gate is closed.

Effect of Gate Triggering

  • Merge into pipeline gate: passed: It is displayed when the pipeline is successfully started after the latest commit or pre-merge commit operation is performed.

  • Merge into pipeline gate: failed: It is displayed when the repository has no associated pipeline task or the latest commit or pre-merge commit fails to start the pipeline.

Passing of the Gate

  1. Choose CICD > Pipeline.
  2. Click Create Pipeline and enter the following information:

    • Name: Enter a custom name.
    • Pipeline Source: Select Repo.
    • Repository: Select the target code repository for which you want to create a merge request.
    • Default Branch: Select the target branch of the merge request.

  3. Click Next, select the target template as required, and click OK.
  4. After the task is created, the system automatically switches to the Task Orchestration tab page in the task details and switches to the Execution Plan tab page.
  5. Enable Merge Request Event Triggering and select the following trigger events based on the site requirements:

    • Create: triggered when an MR is created.
    • Update: triggered when the content or setting of an MR is updated.
    • Merge: triggered when an MR is merged. The code submission event will also be triggered.
    • Reopen: triggered when an MR is reopened.

  6. Configure other information about the pipeline task and click Save.
  7. Return to the CodeArts Repo and trigger the event selected in Execution Plan to enable the repository to start the pipeline task.