- Documentation
Code Pipeline
User guide
Pipeline
Create pipelines using YAML
Pipeline
Create pipelines using YAML
Create pipelines using YAML
Continuous Delivery supports creating pipelines using the YAML method. This article introduces the top-level structure of pipeline YAML, as well as the meaning, usage, and value specifications of each parameter, helping you define the pipeline's source, stage, task, step, and reusable component in a one-off, code-based manner, and manage pipelines through version control.
Pipeline as Code converts pipelines visually orchestrated in the console into structured YAML files, supporting review, audit, gray-scale reuse, and cross-project migration.
- code source (sources): Declare the pipeline trigger source and materials, defining the pipeline's source and trigger method.
- stage (stages): Sequentially define key delivery gates, such as build, test, deploy, and other process nodes.
- task (tasks): A collection of tasks within a single stage that can be executed in parallel or serially, defining the work to be performed in the same stage.
- step (steps): The minimum execution unit within a task, defining the specific execution process for each work item.
- component (component): Atomic capability encapsulation that can be reused across pipelines; business steps can be standardized by referencing components.
Step 1: Enter the YAML editing entry
- In the left navigation bar, select workspace. On the workspace page, click the target workspace name to enter the current workspace.
- Click Create pipeline > YAML editing.
- Click Confirm to enter the YAML configuration page for the current pipeline.
Step 2: Write the pipeline
According to the YAML syntax section, sequentially complete source, stages, tasks, steps, and the optional component. For detailed description, see YAML syntax. A minimum runnable pipeline YAML skeleton example is as follows:
agentPool: public/prod-v2-public
- name: service-connection-demo
url: https://gitee.com/volc-code-pipeline/demo.git
serviceConnectionId: <your-service-connection-id>
displayName: command execution
displayName: command execution
Step 3: Validation and save
- Click Validation at the lower right of the editor. Continuous Delivery will perform YAML syntax, schema, and reference integrity validation.
- After validation passes, click Save to finish creation.
Last updated: 2026.05.11 11:37:44