You need to enable JavaScript to run this app.
Code Pipeline

Code Pipeline

Copy page
Download PDF
Custom pipeline steps
Use custom steps
Copy page
Download PDF
Use custom steps
After custom steps are uploaded successfully, they can be used in the target pipeline. This article explains how to use custom steps in a pipeline.​
Background Information​
This article uses the YAML example from the process of developing Custom steps to demonstrate how to use Custom steps in a pipeline and how to use pipeline variables within a step, showcasing more advanced usage scenarios.​
Prerequisites​
Custom steps have been created. For detailed instructions, see Custom steps.​
Procedure​
Step 1: Add custom steps​
Create or edit a pipeline, add the current custom step, and fill in the step parameters.​
  1. Log in to the Code Pipeline Console.​
  1. In the left navigation bar, select workspace. On the workspace page, click the name of the target workspace to enter the current workspace.​
  1. Create or edit a pipeline, then go to the pipeline process orchestration page.​
  1. Click ➕ to add a stage.​
  1. Click add task to enter the task editing panel.​
  1. Click Add step, select Custom steps, and then select the custom step created in the prerequisites.​
  1. Fill in the parameters for the current step as required. After completing the form, click OK.​
  • ​
    Configuration Item​
    Descriptions​
    Step name​
    This example keeps the default settings unchanged.​
    Execute custom commands​
    This example adds the following command to the default commands.bPipeline dynamic variables set for this example.​
    ​
    echo from front $(parameters.b)​
    ​
    Variables​
    As indicated by the YAML file of the current custom step, the script for the current step will reference and output this parameter. In this example, the parameter is set to the variable a, so the expected output of the step is the value of a.​
    This example is set to $(parameters.a).​
    Skip on failure​
    This configuration is a system configuration. If you want subsequent pipeline tasks to continue running even if the current step fails, you can enable this switch. This example is not enabled.​
    ​
  1. Click Save to save the pipeline configuration.​
Step 2: Run the pipeline​
  1. In the pipeline list, select the pipeline created in Step 1, and click Run in the Actions column. The Run Pipeline dialog box will appear.​
  • Set the runtime value of dynamic variable b to 1000 in this example.​
  • Operation instructions: Optional. This example is left blank.​
  1. Click OK to start the pipeline. The system redirects to the details page for the current pipeline.​
Result validation​
Based on the current custom step YAML example and step parameter configuration, the following information will be output:​
​
hello world​
from front 1000​
ENV:10​
PIPELINE_ID:xxxx​
DATETIME:xxxx​
​
View the pipeline run results. The log information shows that the results meet expectations.​
​
Last updated: 2025.09.10 17:37:26