Using Custom Steps
Once your custom steps are registered via a step registry, you can use them in any pipeline in your organization.
Referencing Custom Steps
Custom step types use the CUSTOM: prefix followed by the type you defined in the @Step decorator:
steps:
- name: Invalidate CDN Cache
type: CUSTOM:CDN-INVALIDATE
goes_after: ["Deploy to ECS"]
params:
distributionId: "E1ABCDEF12345"
paths:
- "/*"
- name: Notify Slack
type: CUSTOM:SLACK-NOTIFY
params:
channel: "#deployments"
message: "Deployment to ${{ stage.name }} complete"
The type field must match the type registered by your step registry. Check the Step Registries section in your organization settings to see available custom step types.
Parameters
Parameters are passed to your step's run or trigger method. They must conform to the Zod schema defined in your step's @Step decorator.
# If your step schema is:
# z.object({ target: z.string(), count: z.number().optional() })
# Then valid params are:
params:
target: "https://api.example.com"
count: 5
Parameters support expressions, just like built-in steps:
params:
target: ${{ vars.api_url }}
version: ${{ trigger.sha }}
api_key: ${{ secret("API_KEY") }}
Parameter validation
Parameters are validated against the Zod schema defined in your step's @Step decorator before the step runs. If validation fails:
- The step fails immediately with a
VALIDATION_ERRORstatus. - The error message includes which parameters failed validation and why (e.g., "Expected string, received number").
- No step code is executed — the failure happens before
runortriggeris called.
To avoid validation errors, ensure your pipeline YAML parameters match the types and constraints defined in your step's schema. Check the step registry in the dashboard to see the expected parameter schema for each custom step.
Custom Step Configuration
Custom steps support additional configuration fields for the execution environment:
- name: My Custom Step
type: CUSTOM:MY:STEP
id: custom
goes_after: ["Terraform"]
params:
imageUrl: ${{ stage.artifacts["API Image"].image_url }}
clusterName: "my_cluster"
| Field | Default | Description |
|---|---|---|
id | -- | Short alias for referencing outputs in expressions. |
goes_after | Previous step | Step dependencies for ordering. |
Viewing Custom Step Logs
Custom steps stream logs to the DevRamps dashboard just like built-in steps. Any output from this.logger.info(), this.logger.error(), etc. in your step code appears in real time.
Available Custom Steps
To see which custom steps are available in your organization:
- Go to your organization settings in the DevRamps dashboard.
- Navigate to Step Registries.
- View the registered step types, their parameters, and status.
Skipping Custom Steps
Custom steps can be skipped per stage using the skip field, just like built-in steps. Reference them by name or id:
stages:
- name: staging
skip: ["Invalidate CDN Cache", "custom"]
# ...