- Documentation
Code Pipeline
User guide
Pipeline
Code source branching model
Pipeline
Code source branching model
Code source branching model
With the pipeline branch model, Code Pipeline automates the creation and merging of integration branches for you. You only need to focus on the feature branches that are ready for integration and release, allowing you to efficiently manage your code branches.
Feature introduction
The branch model is a core method for managing code changes in version control systems. By defining the roles of different branches and establishing merging rules, it enables team collaboration, feature development, integration testing, and release management.
Prerequisites
- The main branch and sub-branches have been created in the code repository.
- A code source has been created in Code Pipeline. For details on actions, see Connect code source.
- The pipeline has been created. For details about the operations, see Create pipeline.
Procedure
tip
- On first run, by default, an integration branch is created based on the base branch configured in the branch manager.
- The pipeline will lock the commits of the corresponding integration branch after branch management has been executed. During pipeline task execution, if the download code feature is configured, the code from the commit record locked by the branch manager will be used for execution.
Step 1: Turn on branch mode
- In the code source configuration of the pipeline, turn on branch mode.
- At the branch integration node, select the base branch under branch management.
Step 2: Run the pipeline
After you turn on branch mode, you can select different branches for integration.
- On the pipeline details page, click Run now.
- On the pipeline run configuration page, select the branch to be integrated.
- Run succeeded. View branch integration status.
- (Optional) Resolving issues by following the prompts is supported when execution fails due to a conflict. After the issue is resolved, click Mark as resolved to automatically retry and complete branch integration.
Last updated: 2025.09.10 17:37:29