Steps: A pipeline job can consist of one or more steps.
Example
The following sample code provides a configuration example for a Java build:
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
A pipeline job can consist of one or more pipeline steps.
stages.<stage_id>.jobs.<job_id>.steps.<step_id>
Required. The ID of the pipeline step, uniquely identifying the step. The step_id must only contain letters, numbers, and underscores, and must start with a letter. Limited to 64 characters in length.
stages.<stage_id>.jobs.<job_id>.steps.<step_id>.step
Required. Specifies the step to use; refer to the step list provided by Flow for details.
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.skipstages.<stage_id>.jobs.<job_id>.steps.<step_id>.name
Optional. The display name of the step. If not provided, the value is the same as step_id. The length limit is 64 characters.
stages.<stage_id>.jobs.<job_id>.steps.<step_id>.workspace
Optional. By default, it uses the user-specified defaultWorkspace. Once a workspace is designated by the user, the pipeline step will automatically execute build commands within that specified working 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.skipstages.<stage_id>.jobs.<job_id>.steps.<step_id>.with
Optional. Please supply parameters for the pipeline steps; refer to the step list provided by Flow for details.