Skip to Content
Pipelines Steps

Add a step to a pipeline

POST
/pipelines/{pipeline_id}/steps

Path Parameters

pipeline_id*integer

The ID of the pipeline.

Range1 <= value

Header Parameters

Accept*string

application/json

Authorization*string

Bearer {{access_token}}

Content-Type*string

application/json

Request Body

A JSON object containing the resource data

application/json
  1. body
name?string

Name/short description of the script. Must be at least 4 characters. Must not be greater than 60 characters.

description?string

A short text describing the command. Can be helpful for other team members to understand why a pipeline step is needed. Must not be greater than 255 characters.

type?string

The pipeline step's type. Must not be greater than 20 characters.

command*string

A command line or multiline bash script. Must be at least 10 characters. Must not be greater than 300 characters.

runner*PipelineStepRunnerName

Name of the script runner that will run the script

Value in"composer""custom""npm""pip""yarn"
run_as_user?string

The name of the Unix user on behalf of which the script will be executed. Must not be greater than 60 characters.

Response Body

Created

application/json
  1. response
id*integer

The unique ID of the given pipeline step

name?|

The pipeline step's name

description?|

The pipeline step's description

type*string

The pipeline step's type

run_as_user*string

The name of the Unix user on behalf of which the script will be executed

command*string

A command line or multiline bash pipeline step

runner*PipelineStepRunnerName

Name of the script runner that will run the script

Value in"composer""custom""npm""pip""yarn"
script_id*integer

The script's ID of this pipeline step

pipeline_id*integer

The pipeline's ID

trigger_order*integer

The relative order of the step execution in case of multiple steps attached to pipeline

is_auto_generated*boolean

True if this step is auto-generated or false if this was created by the user

is_default_step*boolean

True if this step is a default step of the pipeline and cannot be updated/deleted

created_at*string

The date and time when the record was created

updated_at*string

The date and time when the record was last updated

Example Request
curl -X POST 'https://api.devopness.com/pipelines/123/steps' \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <your_api_token>' \  -H 'Content-Type: application/json' \  -H 'Content-Type: application/json' \  -d '{  "command": "echo '\''Deploy with devopness is a breeze!'\'' | tee -a /tmp/build-started.log",  "runner": "pip"}'
Example Response
{  "id": 45678,  "name": "Extra step before build app",  "description": "This is an extra step before build application.",  "type": "default-step",  "run_as_user": "devopness",  "command": "echo 'Deploy with devopness is a breeze!' | tee -a /tmp/build-started.log",  "runner": "pip",  "script_id": 3452033,  "pipeline_id": 7869450,  "trigger_order": 1001,  "is_auto_generated": false,  "is_default_step": false,  "created_at": "2019-09-25T13:22:37.000000Z",  "updated_at": "2019-09-25T13:22:37.000000Z"}