Syntax
# Basic Concepts
# Branch
It corresponds to the code repository's branches (including tags), defines the scope of event triggers, and supports Glob patterns.
# Event
Based on branch configuration, specify a specific event (e.g., git push, pull request, etc.) to trigger subsequent actions, Supports up to 64 Pipelines executing concurrently.
# Pipeline
Defines a sequence of actions triggered by events, including one or more Stages that run in order.
# Stage
Represents a build stage, which can be composed of one or more Job, Job can be executed in series or in parallel.
# Job
It is the most basic unit of task execution.
# examples
Declare several concurrently executing Pipelines in array format
main: # Trigger branch
push: # Trigger event, contains multiple Pipelines, in array form
- name: pipeline-1 # Pipeline structure
stages:
- name: stage-1 # Stage structure
jobs:
- name: job-1 # Job structure
script: echo hello
- name: pipeline-2 # Pipeline structure
stages:
- name: stage-1 # Stage structure
jobs:
- name: job-1 # Job structure
script: echo hello
Declare several concurrently executing Pipelines in object format
main: # Trigger branch
push: # Trigger event, contains multiple Pipelines, in object form
pipeline-1:
stages:
- name: stage-1 # Stage structure
jobs:
- name: job-1 # Job structure
script: echo hello
pipeline-2:
stages:
- name: stage-1 # Stage structure
jobs:
- name: job-1 # Job structure
script: echo hello
# Configuration Reuse
When your configuration file needs to be reused across different repositories,
you can use the include
parameter.
Click for detailed configuration
# Variable Reuse
Use the YAML custom tag reference
to reuse variables.
It can also be used with include when you need to share variables across configurations.