Configuring Pipeline Execution Plans
You can configure event triggers, scheduled tasks, webhooks, and parallel execution policies for a pipeline, to automate executions, trigger executions through third parties, and allocate granular resources.
Configuring Event Triggers
Event triggers include code commit, merge request, and tag creation.
- Access the CodeArts Pipeline homepage.
- On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
- 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.
- Path matching covers the first 300 updated files per submission. To match beyond the 300 files, split them.
- Triggered upon code commits (Repo supported)
- After the configuration, save the pipeline.
Configuring Scheduled Triggers
Set scheduled tasks for pipeline to execute at a specified time.
- Access the CodeArts Pipeline homepage.
- On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
- Switch to the Execution Plan page.
- 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.
- After the configuration, save the pipeline.
Configuring Webhooks
You can configure webhooks to automatically trigger a pipeline through a third-party system.
- Access the CodeArts Pipeline homepage.
- On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
- Switch to the Execution Plan page.
- Enable Webhook, set parameters as shown in Table 2, and save the pipeline for the setting to take effect.
Figure 5 Configuring a webhook trigger
Table 2 Webhook parameters Parameter
Description
Webhook Trigger Source
Copy the address to the third-party system trigger and use the POST method to call the address to run the pipeline.
IAM Authentication
- If you need to enable IAM authentication, add the user IAM token to the API request header. The following is a calling example:
curl --header "Content-Type: application/json" --header 'x-auth-token: XXXX (IAM Token)' --request POST --data "{}" Webhook trigger source
- If you do not need to enable IAM authentication. The following is a calling example:
curl --header "Content-Type: application/json" --request POST --data "{}" Webhook trigger source
- If you need to enable IAM authentication, add the user IAM token to the API request header. The following is a calling example:
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).
- Access the CodeArts Pipeline homepage.
- On the pipeline list page, search for the target pipeline, click in the Operation column, and click Edit.
- Switch to the Execution Plan page.
- Enable Parallel Execution, set the max parallel instances and execution policy for extras.
Figure 6 Configuring parallel execution
Table 3 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.
- Wait: Excess instances will wait for execution. You can check the queuing instances on the pipeline details page.
- After the configuration, save the pipeline.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot