- Documentation
Code Pipeline
User guide
Pipeline
Trigger
Trigger FAQs
Trigger events and trigger conditions
Trigger FAQs
Trigger events and trigger conditions
Trigger events and trigger conditions
This article introduces the trigger events supported by code source triggers, what each trigger event means, and the rules for matching trigger conditions.
- By configuring trigger events, you can filter Webhook events of the code source. The trigger events supported by each code source are as follows.
tip
General Git and Perforce code sources do not directly support the code source trigger function. To enable code source event triggers, configure standard Webhook trigger, and additionally specify which events to send in your code repository settings. - Each trigger event can be configured with its corresponding conditions. Trigger conditions are usually branch names or TAG keywords. By setting trigger conditions, you can further filter the Webhook events of the code source.
Code push
- Code push: Any push event in the repository will trigger the pipeline to run. For example: pushing a local branch to the corresponding remote branch, modifying files on the code management platform, and more. The pipeline runs on the target branch of the push.
- When the target branch of the push successfully matches the trigger condition, the pipeline is triggered.
tip
Codeup code source supports adding file path as a filter condition for code push events. After adding a file path, only Push events in specific code paths can trigger the pipeline.
- The file path defaults to a path under the root directory, so there is no need to start with/Beginning.
- Multiple file paths can be specified, and regular expressions are supported. The matching rules are the same as those for trigger conditions described below in Trigger condition matching rules.
- When both the trigger condition for code Push and the file path are added, the filter applies an AND relationship. For example, the trigger condition for a code push is a push to the Master branch, with the file paths set to demo/a.txt and demo/b.txt. The pipeline is triggered only when a Push event occurs for demo/a.txt or demo/b.txt under the Master branch.
Create a tag
- TAG creation: Creating or updating a TAG in the repository triggers pipeline execution, and the target TAG is used as the code version for the pipeline run.
- TAG creation + trigger condition: When the name of a TAG that is created or updated matches the trigger condition, the pipeline is triggered to run.
After the merge request is completed
- After a merge request is completed, a merge request event created in the code source will trigger the pipeline to run. For example, initiate a merge request from the remote Dev branch (source branch) to the Master branch (target branch). Code Pipeline matches the target branch of the merge request with the Filter. If the match is successful, it triggers the pipeline and uses the Master branch (target branch) as the branch for pipeline execution.
- After the merge request is completed – Trigger condition: When the target branch into which the merge is made matches the trigger condition, the pipeline runs.
Create or update merge requests
- Merge request creation/update: Creating a merge request event in the code source will trigger the pipeline to run. For example, initiate a merge request from the remote Dev branch (source branch) to the Master branch (target branch). Code Pipeline matches the target branch of the merge request against the filter criteria. If the match is successful, the pipeline is triggered, and the Dev branch (source branch) is used as the branch during pipeline execution.
- Merge request creation or update and trigger condition: When the source branch matches the trigger condition, the pipeline runs.
Create a patch set
- Patch set creation: After a new patch set is created in the repository, the pipeline is triggered to run. The branch on which the pipeline runs is the branch used to create the patch set.
- Patch set creation and trigger conditions: When the branch used to create a patch set matches the trigger conditions, the pipeline is triggered.
Matching rules for trigger conditions
- The matching rules for each trigger condition are as follows:
- If the trigger condition expression does not contain special metacharacters, it is considered an exact match.
- If the following special metacharacters are present, it is considered a Golang regular expression match.
warning
The metacharacters in Golang regular expressions are:
- Basic metacharacters:.,\,*,+,?,^,$, [],{},|, ()
- Complex metacharacters: [^], [-], (?:), (?!), (?=), (?<=), (?<!)
- Allows you to add multiple trigger conditions, which are connected by an "or" relationship.
Last updated: 2025.09.10 17:37:28