Syntax

# Basic Concepts

  • Branch: Branches in the corresponding code repository that specify the scope of event responses, supporting wildcards.
  • Event: Specifies when an event occurs, triggers a build, which can contain up to 64 Pipeline running concurrently.
  • Pipeline: Represents a pipeline, which can contain one or more Stage, each Stage is executed in turn.
  • 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 task execution unit.

Multiple Pipeline run concurrently, in array form

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

Multiple Pipeline run concurrently, in object form

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. Detailed configuration

# Variable Reuse

Using the yaml custom tag reference can achieve variable reuse, which can be used in conjunction with include. Detailed configuration