> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amnify.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pipelines

A **Pipeline** is an ordered sequence of Deployments that execute together, one after another. When you trigger a Pipeline, Amnify Deploy runs each Deployment in the defined order, waiting for one to complete before starting the next.

***

## Why Pipelines Exist

Cloud infrastructure often has dependencies. A database must exist before an application can connect to it. A virtual network must be provisioned before compute resources can join it. A shared platform layer must be ready before tenant-specific infrastructure can be layered on top.

Without Pipelines, you would need to manually execute each Deployment in the right order, wait for it to finish, then trigger the next one. Pipelines automate this coordination.

***

## What a Pipeline Contains

| Property                  | Description                                                               |
| ------------------------- | ------------------------------------------------------------------------- |
| **Name**                  | A descriptive name for the pipeline (e.g., "Full Platform Rollout")       |
| **Description**           | An optional explanation of the pipeline's purpose                         |
| **Deployments (ordered)** | A list of existing Deployments, arranged in the order they should execute |

A Pipeline does not own Deployments — it references them. The same Deployment can appear in multiple Pipelines, and Deployments can also be executed individually outside of any Pipeline.

***

## How Pipeline Execution Works

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant PL as Pipeline
    participant D1 as Deployment 1
    participant D2 as Deployment 2
    participant D3 as Deployment 3

    U->>PL: Trigger Pipeline
    PL->>D1: Execute
    D1-->>U: Awaiting Plan Approval
    U->>D1: Approve
    D1-->>PL: Completed ✓
    PL->>D2: Execute
    D2-->>U: Awaiting Plan Approval
    U->>D2: Approve
    D2-->>PL: Completed ✓
    PL->>D3: Execute
    D3-->>U: Awaiting Plan Approval
    U->>D3: Approve
    D3-->>PL: Completed ✓
    PL-->>U: Pipeline Complete ✓
```

Key points about execution:

* Deployments run **sequentially** — not in parallel
* Each Deployment still goes through its individual approval workflow (plan approval, then apply)
* If a Deployment fails, the Pipeline stops at that point — subsequent Deployments are not executed
* You can monitor the progress of each individual Deployment run from within the Pipeline Run detail view

***

## Pipeline Runs

Every time you trigger a Pipeline, a **Pipeline Run** is created. It tracks:

* The overall status of the Pipeline
* Which Deployment is currently executing (or which one failed)
* Links to each individual Deployment Run so you can drill into logs and details

***

## When to Use a Pipeline vs. Individual Deployments

**Use a Pipeline when:**

* Your Deployments have dependencies on each other
* You want a single trigger to roll out multiple pieces of infrastructure
* You need a repeatable, ordered provisioning process

**Use individual Deployments when:**

* The infrastructure is independent and can be provisioned in any order
* You only need to update or re-run one specific Deployment
* You are experimenting or troubleshooting a specific component

***

## Reordering Deployments in a Pipeline

The order of Deployments within a Pipeline can be changed at any time from the Pipeline detail page. Reordering does not affect any running or previously completed Pipeline Runs — it only applies to future runs.

***

## Next Steps

* [Deployment Lifecycle](/cspm-deploy/concepts/deployment-lifecycle) — understand how each Deployment within a Pipeline is executed and approved
* [Creating Pipelines guide](/cspm-deploy/guides/creating-pipelines) — step-by-step walkthrough
