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

# Pipelines

> Set up deployment pipelines for continuous delivery and integration.

Pipelines enable you to automate the entire process of moving code from development to production. You can define multiple stages within your pipeline and include multiple applications in each stage. Once your pipeline is set up, the **Promote** feature allows you to seamlessly push changes from the source code to QA and production environments without the need to rebuild the application. Pipelines also support the Git Flow strategy, providing a clear visual representation of your application's development and deployment workflow.

With pipelines, you can:

* **Deploy software with different environment variables:** This is ideal for scenarios like a B2B application used by multiple customers, where each customer requires slight variations in their dashboard.
* **Deploy the same application across multiple geographical locations:** This helps improve performance and reduce latency for users in different regions.
* **Run A/B tests:** Easily deploy different versions of your application to targeted user groups so you can test which version delivers better results.

Using pipelines streamlines the deployment process, enhances flexibility, and supports a structured approach to managing multiple environments.

With Pipelines, applications are **free** until they are deployed. Billing only begins once a deployment takes place and the application is actively running.

The **Promote** feature is also [accessible through our API](https://api-docs.sevalla.com/v3/pipelines/promote-pipeline), making it easy to integrate with third-party CI/CD tools like GitHub Actions for streamlined workflows.

Watch our video to see how to create a delivery pipeline for a Laravel application hosted on Sevalla.

<iframe src="https://www.youtube.com/embed/MWe32UhzKaw?si=HUQeJ1TisW4AGJWc" frameBorder="0" allowFullScreen width="100%" style={{ aspectRatio:"16 / 9" }} />

## Add a pipeline

To add a new pipeline, within **Applications**, click **Create** > **Pipeline**.

<Frame caption="Add a new pipeline within Applications">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/Hjd3963gvMiOruY6/images/add-pipeline-dark.png?fit=max&auto=format&n=Hjd3963gvMiOruY6&q=85&s=d83e549cd6c9c17f2ee842bf613c72ec" alt="Add a new pipeline" width="978" height="1656" data-path="images/add-pipeline-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/Hjd3963gvMiOruY6/images/add-pipeline-light.png?fit=max&auto=format&n=Hjd3963gvMiOruY6&q=85&s=8f7c3d9f2ae97aceace16c360386b20a" alt="Add a new pipeline" width="982" height="1656" data-path="images/add-pipeline-light.png" />
</Frame>

* **Name:** Enter a name for the pipeline.
* **Project:** This option is only shown if your company already has at least one project. Select the project you’d like to add the pipeline to, or leave it blank to keep the pipeline at the company level instead of assigning it to a specific project.
* **Trunk-based development:** With a trunk-based development pipeline, you can add an existing application to your development stage and create multiple production environments as separate applications for deployment. Each of these applications can be hosted in different [data centers](/service-information/data-center-locations/) and is treated as an independent entity within its own container. This setup allows you to deploy multiple applications from the same source code but with distinct [environment variables](/applications/environment-variables/), [domains](/applications/domains/), [processes](/applications/processes), and other configurations.
* **Git flow:** Choose this option if your workflow uses separate branches for development, staging, and production. To use the Git Flow pipeline, your applications must already be set up within Sevalla. This approach lets you visually manage and track your Git Flow directly in the platform. The Promote feature is not available in this workflow, as deployments occur automatically when you push changes from your Git source repository.

You also have the flexibility to add multiple stages to the pipeline, such as a QA stage, to thoroughly test your changes before promoting them to production.

Click **Add pipeline**, which creates the pipeline in your list of applications. You can then select the pipeline to add your stages and applications, enable preview apps, and change the pipeline settings.

<Frame caption="Application pipeline workflow.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-workflow-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=d3439b199343b90fd8b06f0ed9920456" alt="Application pipeline workflow" width="2298" height="636" data-path="images/pipeline-workflow-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-workflow-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=6fb6e3bcc7645735d8b89a15a560f46f" alt="Application pipeline workflow" width="2298" height="636" data-path="images/pipeline-workflow-light.png" />
</Frame>

### Enable preview apps

Enabling preview apps allows you to test your changes in a live environment before merging them into the main branch. Preview apps are integrated with GitHub's deployment and environment features, so when you open a pull request, a preview app is automatically generated, providing a dedicated testing space that mirrors your production setup. This lets you review, interact with, and refine your updates to ensure your code works as intended before it's fully integrated into the main project.

To enable preview apps within the pipeline, click **Enable preview apps**.

<Frame caption="Enable preview apps for your pipeline.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-enable-preview-apps-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=a1b41a53d559eb2965542aed2b0d63f1" alt="Enable preview apps for your pipeline" width="2560" height="666" data-path="images/pipeline-enable-preview-apps-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-enable-preview-apps-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=f7f9fb3961d14ed52bf0483fea67659e" alt="Enable preview apps for your pipeline" width="2564" height="666" data-path="images/pipeline-enable-preview-apps-light.png" />
</Frame>

When you click **Enable preview apps**, the following options are available:

#### Preview settings

* **Automatically create new preview apps for each pull request:** Select this option to create a new preview app each time you open a pull request. The preview app is deleted when the pull request is closed.
* **Delete stale preview apps automatically:** Select this option to automatically delete preview apps when no new deployments occur. You'll need to specify the number of days without any new deployments before the preview apps are scheduled for deletion.

#### App settings

* **Git provider:** Choose [GitHub](/applications/git/github), [GitLab](/applications/git/gitlab), or [Bitbucket](/applications/git/bitbucket) and connect your Git account.
* **Repository:** Choose a Git repository.
* **Location:** Choose the [data center](/service-information/data-center-locations/) you want to use for this application.
* **Build type:** Choose [Nixpacks](/applications/build-options/nixpacks), [Railpack](/applications/build-options/railpack), [Buildpacks](/applications/build-options/buildpacks), or a [Dockerfile](/applications/build-options/dockerfile).
* **Build path:** For Nixpacks, Railpack, and Buildpacks, this is the path in the repository to the files required to build the application. For Dockerfiles, this is the path to your Dockerfile relative to the repository root.
* [**Hibernation:**](/applications/settings#hibernation) This automatically scales down your application if no HTTP requests are received within the specified timeframe.

#### Processes

In this section, you can adjust the settings and resources for your web process and add any necessary [background workers](/applications/processes#background-worker), [jobs](/applications/processes#job-process), or  [cron jobs](/applications/processes#cron-job-process).

#### Disks

If you require [persistent storage](/applications/storage) for your web process or any of your background workers, you can add it here.

#### TCP proxies

This option [exposes non-HTTP traffic](/applications/networking#tcp-proxy) for up to three processes over TCP using a proxied domain and port.

#### Environment variables

Add any required [environment variables](/applications/environment-variables/) for your preview app.

<Frame caption="Preview app settings.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-preview-app-settings-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=bd37176e32ae08cd3944ac7b97f9f8f0" alt="Preview app settings" width="1350" height="2142" data-path="images/pipeline-preview-app-settings-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-preview-app-settings-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=52163d48aa78893c7628113828d58861" alt="Preview app settings" width="1352" height="2146" data-path="images/pipeline-preview-app-settings-light.png" />
</Frame>

Once you've added the required details, click **Enable preview apps**.

To change the settings of the preview app, click **Preview app settings**.

<Frame caption="Update the preview app settings.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-update-preview-app-settings-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=2fdc61e9572885179a9e59dff37b43b3" alt="Update preview app settings" width="2562" height="640" data-path="images/pipeline-update-preview-app-settings-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-update-preview-app-settings-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=fd15ce27d3420756d1760225e7b9311d" alt="Update preview app settings" width="2566" height="650" data-path="images/pipeline-update-preview-app-settings-light.png" />
</Frame>

To manually deploy the preview app, click the ellipsis on **Preview** and select **Deploy preview app**.

<Frame caption="Manually deploy your preview app or update the settings.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-deploy-preview-app-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=1f6b7ddde4a6754f8af2f6fe9159b694" alt="Deploy your preview app" width="2566" height="636" data-path="images/pipeline-deploy-preview-app-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-deploy-preview-app-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=9a0164d62e602a8e1e578d731baf488f" alt="Deploy your preview app" width="2566" height="646" data-path="images/pipeline-deploy-preview-app-light.png" />
</Frame>

### Add an app to a stage

To add an application to a stage, click **Add app**. You can then choose to add an existing application or create a new one. You can only create a new application within the trunk-based development pipeline. If you're using the Git Flow pipeline, the applications must already exist within Sevalla.

<Frame caption="Add an application to a stage in the pipeline.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-add-app-stage-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=270c44fa06aa9c205686790cc0da892e" alt="Add an application to a stage in the pipeline" width="1172" height="798" data-path="images/pipeline-add-app-stage-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-add-app-stage-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=0003e8aafba084c65505ae777dad866c" alt="Add an application to a stage in the pipeline" width="1176" height="1012" data-path="images/pipeline-add-app-stage-light.png" />
</Frame>

For trunk-based pipelines, the first stage of your pipeline should be the source for the rest of the pipeline, so you must choose an existing application. You can then choose to create a new application for any of the following stages.

<Frame caption="Application pipeline with two production environments.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-existing-app-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=efe78456a0e53c4fb7dd6a1df244b38c" alt="Application pipeline with two production environments" width="2578" height="986" data-path="images/pipeline-existing-app-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-existing-app-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=f1e4225786a8c977d8e6f1b4bf5f0f04" alt="Application pipeline with two production environments" width="2568" height="1002" data-path="images/pipeline-existing-app-light.png" />
</Frame>

### Add a stage

To add another stage to the pipeline, click **Create stage**.

<Frame caption="Create a new stage in your pipeline.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-create-stage-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=c045933ae17d48547faf83b64d9ee8fd" alt="Create a new stage in your pipeline" width="2562" height="990" data-path="images/pipeline-create-stage-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-create-stage-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=c7c3a210c1e849e87b72dacb6cc1123d" alt="Create a new stage in your pipeline" width="2560" height="996" data-path="images/pipeline-create-stage-light.png" />
</Frame>

Enter a name for the stage and click **Create stage**. You can drag and drop the stages to change the order in which you want to deploy the application.

<Frame caption="Add a name for the stage and change the order.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-create-stage-qa-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=cec225f93683343edd0e4a0809f856a8" alt="Add a name for the stage and change the order" width="1182" height="1000" data-path="images/pipeline-create-stage-qa-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-create-stage-qa-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=806de7b724df995322c53bc078407f93" alt="Add a name for the stage and change the order" width="1180" height="1018" data-path="images/pipeline-create-stage-qa-light.png" />
</Frame>

You can then add a new application to the stage.

<Frame caption="Application pipeline with a QA stage.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-qa-stage-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=551fbbf07e81c77dcdf67741cca00639" alt="Application pipeline with a QA stage" width="2566" height="996" data-path="images/pipeline-qa-stage-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-qa-stage-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=5fa700c2e205e6b81f2a35de93cc9f5e" alt="Application pipeline with a QA stage" width="2578" height="1004" data-path="images/pipeline-qa-stage-light.png" />
</Frame>

### Promote changes to production

If you've set up a trunk-based pipeline, you can use the **Promote** option to push the application to each stage without having to rebuild it. If you're promoting to a stage with multiple applications, you can choose which applications to promote to. If you don't want to promote a particular application, click the minus sign on that application to remove it from the deployment.

<Frame caption="Promote your changes to multiple applications.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-promote-changes-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=8c502850a8613ef71122736b55b74d7b" alt="Promote your changes to multiple applications" width="1590" height="1106" data-path="images/pipeline-promote-changes-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-promote-changes-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=d772a2252314d845b37e4b45ef107fc0" alt="Promote your changes to multiple applications" width="1578" height="1096" data-path="images/pipeline-promote-changes-light.png" />
</Frame>

Within **Applications**, the pipeline displays all the included applications, clearly labeling each application's stage within the pipeline and when it was last deployed.

<Frame caption="Applications pipeline.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/40BMwYMBrkEyfQ_W/images/applications-pipeline-dark.png?fit=max&auto=format&n=40BMwYMBrkEyfQ_W&q=85&s=fd83c8e7b7265187070eae07d6f6d72d" alt="Applications pipeline" width="2566" height="756" data-path="images/applications-pipeline-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/40BMwYMBrkEyfQ_W/images/applications-pipeline-light.png?fit=max&auto=format&n=40BMwYMBrkEyfQ_W&q=85&s=fb9bfeb7d9caca13837d5b64209360b0" alt="Applications pipeline" width="2568" height="758" data-path="images/applications-pipeline-light.png" />
</Frame>

## Pipeline settings

To access the pipeline settings, click **Pipeline settings**. The settings allow you to switch between trunk-based development and git flow pipelines. You can also update the name of your pipeline and change the order of the stages within it.

<Frame caption="Application pipeline settings.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-settings-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=dc06eb7d3f0d974e429b38328266107f" alt="Pipeline settings" width="1190" height="1604" data-path="images/pipeline-settings-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-settings-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=550e5552ae9eac24cbade63fedbd1dfc" alt="Pipeline settings" width="1184" height="1662" data-path="images/pipeline-settings-light.png" />
</Frame>

## Delete a pipeline

To delete a pipeline, within **Applications**, select the pipeline you want to delete and click **Delete pipeline**.

<Frame caption="Delete an application pipeline.">
  <img className="hidden dark:block" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-delete-dark.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=5b84749abb8c2a146ee453b29a7e83bd" alt="Delete a pipeline" width="2572" height="1064" data-path="images/pipeline-delete-dark.png" />

  <img className="dark:hidden" src="https://mintcdn.com/sevalla/bgLCf4Xd83tbb_SG/images/pipeline-delete-light.png?fit=max&auto=format&n=bgLCf4Xd83tbb_SG&q=85&s=ced1761d8557162e54993e131ff48c5b" alt="Delete a pipeline" width="2572" height="1058" data-path="images/pipeline-delete-light.png" />
</Frame>

This only deletes the pipeline; the applications **are not** removed and will remain in your **Applications** list. To completely remove an application, go to **Settings** > **Danger Zone** > **Delete application**. Deleting the application completely removes the following:

* All files
* Settings
* Persistent storage disks
* Connections to other applications or databases
