Help Center/ CodeArts Pipeline/ User Guide/ Configuring a Pipeline/ Configuring Pipeline Execution Plans
Updated on 2024-10-15 GMT+08:00

Configuring Pipeline Execution Plans

You can configure event triggers and scheduled tasks for a pipeline. You can also configure parallel execution policies to realize efficient resources allocation.

Configuring Event Triggers

Event triggers include code commit, merge request, and tag creation.

  1. Access the CodeArts Pipeline homepage.
  2. On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
  3. Switch to the Execution Plan page, and then configure event triggers.

    • Triggered upon code commits (Repo supported)

      You can filter branches and paths by including or excluding specific ones. Target branches and paths will be monitored for code commits.

      • Branch filter: allows you to include or exclude branches.
      • Path filter: allows you to include or exclude paths where changed files locate.
      Figure 1 Configuring code commit trigger
    • Triggered upon merge requests (Repo)

      You can filter branches and paths by including or excluding specific ones. Target branches and paths will be monitored for merge request events such as MR creation, updating, reopening, and code merge.

      Event description:

      • Create: triggered upon MR creation.
      • Merge: triggered when an MR is merged. The code submission event will also be triggered.
      • Reopen: triggered upon MR reopening.
      • Update: triggered upon MR content, setting, or source code update. If you enable Code update at the same time, the pipeline will be triggered only upon source code update.

      Branch description:

      • Branch filter: allows you to include or exclude branches.
      • Path filter: allows you to include or exclude paths where changed files locate.
      Figure 2 Configuring merge request trigger
    • Triggered upon tag creation (Repo)

      You can filter tags by including or excluding specific ones. The associated code repository will be monitored for tag creation.

      Figure 3 Configuring tag creation trigger
    • The branch is matched first, and then the path is matched. If the matching is successful, the pipeline will be triggered.
    • Path exclusion takes precedence over path inclusion. If any changed files are not excluded, and the included path is not configured, the pipeline will be triggered; if the included path is configured and any of the changed files are included, the pipeline will be triggered.
    • Tag exclusion takes precedence over tag inclusion. If a tag is included and excluded at the same time, the pipeline will no be triggered.

  4. After the configuration, save the pipeline.

Configuring Scheduled Triggers

Set scheduled tasks for pipeline to execute at a specified time.

  1. Access the CodeArts Pipeline homepage.
  2. On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
  3. Switch to the Execution Plan page.
  4. Click Create now to create a scheduled task. Turn on the Enable toggle, set the execution time.

    Figure 4 Configuring a scheduled task
    Table 1 Scheduled task

    Parameter

    Description

    Run On

    Select the execution date.

    Time Period

    Select the execution period and time zone.

    Time Interval

    Set the interval for triggering the pipeline.

    • You can create a maximum of 10 scheduled tasks.
    • To delete a scheduled task, click in the upper right corner. To clone a scheduled task, click in the upper right corner.

  5. After the configuration, save the pipeline.

Configuring Parallel Execution

By default, five parallel executions are allowed in a pipeline. Excess instances will not be executed. Alternatively, you can change the maximum number of parallel instances (running and paused).

  1. Access the CodeArts Pipeline homepage.
  2. On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
  3. Switch to the Execution Plan page.
  4. Enable Parallel Execution, set the max parallel instances and execution policy for extras.

    Figure 5 Configuring parallel execution
    Table 2 Parallel execution parameters

    Parameter

    Description

    Parallel Instances

    Maximum parallel instances, which vary by your purchases and packages.

    For Excess Instances

    You can choose:

    • Wait: Excess instances will wait for execution. You can check the queuing instances on the pipeline details page.
      • Max. 100 queuing instances per pipeline.
      • Instances will not be executed after 24 hours of waiting.
      • You can manually cancel the waiting.
      • Configurations of instances will not be changed once they enter the queue.
    • Ignore: Excess instances will not be executed.

  5. After the configuration, save the pipeline.