Create a Pipeline (Migrate)

Updated 4 months ago by Archana Singh

Pipelines define your release process using multiple Workflows and Approvals in sequential and/or parallel stages. Pipelines can involve multiple Services, Environments, and Workflows. A Pipeline can be triggered either manually or using Triggers.

In this topic:

Before You Begin

Visual Summary

Step 1: Add a Pipeline

To add a Pipeline, perform the following steps:

  1. Click Setup and then select the Application that you want to deploy.
  2. In Application Defaults, click Pipelines and then click Add Pipeline. The Add Pipeline settings appear.
  3. Enter a Name for your Pipeline. This name is used for selecting the Pipeline on the Deployments page.
  4. Enter Description for your Pipeline and click Submit. The following settings appear.
  5. Select the Execution Step to execute this stage when the Pipeline runs.
    1. In Step Name, enter the name for this stage. This name acts as a subheading to the stage name. You can also select the Auto Generate Name checkbox to generate the name automatically.
    2. In Execute Workflow, select the Workflow to execute in this Pipeline. The Workflows in your Application are listed.
    3. Select Execute in Parallel with Previous Step checkbox to execute steps in parallel.
    4. Select Do not skip, Skip always, or Skip based on assertion expression for setting the skip option. For more information, see Skip Execution.
    5. Enter Assertion Expression. It enables you to specify an expression that determines whether the stage should execute. For more information, see Assertion Expression.
  6. Select Approval Step to require approval before the next stage executes. You can use Harness UI, Jira, Custom Shell Script, or ServiceNow Approval mechanisms. For more information on Approvals, see Add Approvals.
  7. Click Submit. The Pipeline Stage and its steps are added to the Pipeline.
  8. You can add multiple Stages, and insert new Stages between the existing Stages. Pipelines Stages can be Workflows or Approvals. To add another stage to the Pipeline, in Pipeline Stages, click + and then follow the same Steps.

Step 2: Deploy a Pipeline

Once you have set up a Pipeline, you can deploy it, running all the stages within the Pipeline.

  1. In your Application, select the Pipeline that you want to deploy. The Pipeline Overview page appears.
  2. Click Deploy to run the Pipeline. The Start New Deployment dialog appears.

    When you set up the Pipeline stage(s), you picked the Workflow(s) the Pipeline will execute. The Workflow you selected is linked to a Service. The Start New Deployment dialog is configured with the Services linked to the Workflows included in the Pipeline. The settings are displayed based on your Workflow variables.
  3. Click Submit. The Pipeline is deployed and the deployment details are displayed in the Deployments page. You can click each phase in the process to see logs and other details of the process.

Step 3: Abort or Rollback a Running Deployment

If you deploy a Pipeline and choose the Abort option during the running deployment, the Rollback Steps for the Workflow(s) in the Pipeline are not executed. Abort stops the deployment execution without rollback or clean up. To execute the Rollback Steps, click the Rollback button.

Abort Button

Rollback Button

Incomplete Pipelines

If a Workflow in a Pipeline is incomplete (missing information in a Workflow step), then the Pipeline Stage for that Workflow will indicate that the Workflow is incomplete:

Open the incomplete Workflow, complete it, and then return to the Pipeline.

Another example of an incomplete Workflow is a Workflow with Workflow variables that have not been given default values.

If you try to deploy a Pipeline with an incomplete Workflow, Harness will prevent you.

Simply fix the Workflow and then deploy the Pipeline.

Review: RBAC for Pipelines

Pipeline follows standard Harness RBAC as described in Managing Users and Groups (RBAC).

Your ability to read, create, delete, and update Pipelines depends on the Pipeline Application Permissions of your User Group.

Your ability to deploy Pipelines also depends on your Deployments Application Permissions.

Next Steps

How did we do?