All Products
Search
Document Center

Alibaba Cloud DevOps:Steps

Last Updated:Jun 18, 2026

Pipeline steps are the basic units that make up a pipeline job. Each step represents a specific action such as compiling code, running tests, or deploying an application.

Example

The following example shows a Java build configuration:

stages:
  build_stage:
    name: Build Stage
    jobs:
      build_job: 
        name: Build Job
        RunsOn:
          group: public/ap-southeast-1
          container: build-steps-public-registry.ap-southeast-1.cr.aliyuncs.com/build-steps/alinux3:latest
        steps:                                  # Use `steps` keyword to configure a job.
          build_step:
            setup_java_step:
            name: Set up Java SDK
            step: SetupJava
            with:
              jdkVersion: "1.8"
              mavenVersion: "3.5.2"
          command_step:
            name: Execute Command
            step: Command
            with:
              run: |
                mvn -B clean package -Dmaven.test.skip=true -Dautoconfig.skip
          upload_artifact_step:
            name: Artifact Upload
            step: ArtifactUpload
            with:
              uploadType: flowPublic
              artifact: "Artifacts_${PIPELINE_ID}"
              filePath:
                - target/

Detailed explanation

stages.<stage_id>.jobs.<job_id>.steps

Defines the list of steps to run in a pipeline job. A job can contain one or more steps.

stages.<stage_id>.jobs.<job_id>.steps.<step_id>

Required. A unique identifier for the step. The value must contain only letters, numbers, and underscores, start with a letter, and be no longer than 64 characters.

stages.<stage_id>.jobs.<job_id>.steps.<step_id>.step

Required. The type of step to run. For available step types, see the step list provided by Flow.

For example:

jobs:
  build_job: 
    name: Build Job
    RunsOn:
      group: public/ap-southeast-1
      container: build-steps-public-registry.ap-southeast-1.cr.aliyuncs.com/build-steps/alinux3:latest
    steps:
      build_step:
        name: Execute Command
        step: Command
        with:
          run: |
            mvn -B clean package -Dmaven.test.skip=true -Dautoconfig.skip

stages.<stage_id>.jobs.<job_id>.steps.<step_id>.name

Optional. The display name of the step. Defaults to the step_id value if not specified. Maximum length: 64 characters.

stages.<stage_id>.jobs.<job_id>.steps.<step_id>.workspace

Optional. The working directory in which the step executes. Defaults to the value of defaultWorkspace. When specified, the step runs build commands in the given directory.

For example:

sources:
  repo1:
    ……
  repo2:
    ……
defaultWorkspace: repo1
stages:
  build_stage:
    name: Build Stage
    jobs:
      build_job: 
        name: Buiild Job
        RunsOn:
          group: public/ap-southeast-1
          container: build-steps-public-registry.ap-southeast-1.cr.aliyuncs.com/build-steps/alinux3:latest
        steps:
          build_step:
            name: Execute Command
            step: Command
            workspace: repo2		# Set the execution workspace for the `Execute Command` step to `repo2`.
            with:
              run: |
                mvn -B clean package -Dmaven.test.skip=true -Dautoconfig.skip

stages.<stage_id>.jobs.<job_id>.steps.<step_id>.with

Optional. Input parameters for the step. For supported parameters, see the step list provided by Flow.