Create a Pipeline
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
- Step 1: Add a Pipeline
- Step 2: Deploy a Pipeline
- Step 3: Abort or Rollback a Running Deployment
- Incomplete Pipelines
- Review: RBAC for Pipelines
- Next Steps
Before You Begin
Step 1: Add a Pipeline
To add a Pipeline, perform the following steps:
- Click Setup and then select the Application that you want to deploy.
- In Application Defaults, click Pipelines and then click Add Pipeline. The Add Pipeline settings appear.
- Enter a Name for your Pipeline. This name is used for selecting the Pipeline on the Deployments page.
- Enter Description for your Pipeline and click Submit. The following settings appear.
- Select the Execution Step to execute this stage when the Pipeline runs.
- 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.
- In Execute Workflow, select the Workflow to execute in this Pipeline. The Workflows in your Application are listed.
- Select Execute in Parallel with Previous Step checkbox to execute steps in parallel.
- Select Do not skip, Skip always, or Skip based on assertion expression for setting the skip option. For more information, see Skip Execution.
- Enter Assertion Expression. It enables you to specify an expression that determines whether the stage should execute. For more information, see Assertion Expression.
- 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.
- Click Submit. The Pipeline Stage and its steps are added to the Pipeline.
- 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.
- In your Application, select the Pipeline that you want to deploy. The Pipeline Overview page appears.
- 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.
- 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.
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.