> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/pipeline/configuring-pipeline-steps/adding-a-pipeline-step.md).

# Adding a Pipeline Step

{% hint style="warning" %}

#### Written for the Old UI

This article was written for the old UI. The instructions are still usable, but the screenshots are outdated. In some cases, items referenced in the instructions have moved or changed. If you cannot find an item, see the [Where Did It Go](/devops/new-ui-ux-transition/where-did-it-go.md) article.
{% endhint %}

## ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) Overview

A pipeline comprises multiple steps, each outlining an operation and its configuration. Each step also specifies the next step based on the result of the current operation. This guide provides detailed instructions for creating a step with the Validate operation example, as the procedure is similar across operations. It excludes specifics about configuring each operation. For details on specific operations, consult the associated article for the operation you are incorporating into your step.

* [Pipeline Operation: Validate](/devops/pipeline/pipeline-operations/pipeline-operation-validate.md)
* [Pipeline Operation: Code Scan](/devops/pipeline/pipeline-operations/pipeline-operation-code-scan.md)

## Add a Step

{% stepper %}
{% step %}

### Create or Edit Pipeline

1. Click **Pipelines** from the left sidebar menu.
2. On the **Pipelines** page, create or edit a pipeline by either:
   * Clicking **Create Pipeline**.
   * Or clicking an existing pipeline from the list.

     <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F7BkPhf8YanIRtmJKGDHs%2FAddingValidatingStep-Add-S01-01.png?alt=media&amp;token=fa4be7d9-64b4-4648-939f-143c13c0d754" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Add a Step

1. Click the **+** icon between two steps.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F1ru3eHnAffx4hyeQUbcP%2FAddingValidatingStep-Add-S02-01.png?alt=media&amp;token=c43cc36c-a887-4ea8-9807-78439e6eeea3" alt="" width="375"><figcaption></figcaption></figure></div>
2. Enter a **Name** for the step.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEKXxnEBBZWFRJNNc6DN1%2FAddingValidatingStep-Add-S02-02.png?alt=media&amp;token=edfcd21e-84b0-4055-821a-bf1253d13ec4" alt="" width="375"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Select Operation

1. Click the **Operation** dropdown menu.
2. Select **Validate**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FTDtdR0Drk2fRCLeIckRd%2FAddingValidatingStep-Add-S03-01.png?alt=media&amp;token=0c2c50a4-3834-4daa-bb51-7c1f2d617810" alt="" width="375"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Configure Operation

Each operation includes specific fields and options. For detailed configuration guidelines for the operation you're adding, please refer to the relevant article linked below.

* [Pipeline Operation: Validate](/devops/pipeline/pipeline-operations/pipeline-operation-validate.md)
* [Pipeline Operation: Code Scan](/devops/pipeline/pipeline-operations/pipeline-operation-code-scan.md)
  {% endstep %}

{% step %}

### Set Next Step Behavior

The **Next Step** section lets you control which step comes next based on whether the current step **passes** or **fails**.

{% hint style="warning" %}

#### Step Removal Warning

If a step has no paths to it, it will be automatically removed from the pipeline. This can occur, for example, if you insert a **Validate** step before a **Deploy** step and set both **On pass** and **On fail** to **Stop**. In this scenario, there is no longer a path to reach the **Deploy** step, and the pipeline automatically removes orphaned steps. See the diagram below to help visualize the issue. &#x20;
{% endhint %}

<div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FszUYosNNH5oZLpG9zvWY%2FFlosumPipelineNextStepExample-02.png?alt=media&amp;token=2947b39d-620c-44b3-a051-73c3d29c2d56" alt="" width="563"><figcaption></figcaption></figure></div>

1. Click the **On pass** dropdown menu.
2. Select the step to proceed to if the current step **passes**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FS0IjCNocDSy0YPjju98o%2FAddingValidatingStep-Add-S05-01.png?alt=media&amp;token=c142c032-4870-456c-a524-f6fd651ea027" alt="" width="375"><figcaption></figcaption></figure></div>
3. Click the **On fail** dropdown menu.
4. Select the step to proceed to if the current step **fails**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FdPQlM6wYp2oJhps7K9ba%2FAddingValidatingStep-Add-S05-02.png?alt=media&amp;token=ea6c6434-6966-4656-949f-00c0a92bcf7d" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
Do not set both **On pass** and **On fail** to **Stop** unless it is the final step in the pipeline.
{% endhint %}
{% endstep %}

{% step %}

### Add Step to Pipeline

1. Click **Add**.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FCT0OatTn02laEwAQ218V%2FAddingValidatingStep-Add-S06-01.png?alt=media&amp;token=68f773b4-d30d-42aa-be7d-915a4148a5e8" alt="" width="375"><figcaption></figcaption></figure></div>
2. Once the step appears in the pipeline, it is automatically saved.

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2F1POpfhDYx33soprn4YNd%2FAddingValidatingStep-Add-S06-02.png?alt=media&amp;token=eaf5882d-90c1-4ff4-8029-5c20a209b90f" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
The pipeline is automatically saved every time a change is made.
{% endhint %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/pipeline/configuring-pipeline-steps/adding-a-pipeline-step.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
