6 - Artifact Build and Deploy Pipelines

Updated 1 month ago by Michael Cretzman

Pipelines define your release process using multiple Workflows and approvals in sequential and/or parallel stages. And Artifact Build and Deploy Pipeline simply runs your Build Workflow followed by your Deploy Workflow. The Deploy Workflow uses the Harness Service you set up to get the new build number.

To create the Artifact Build and Deploy Pipeline, do the following:

  1. In your Harness Application, click Pipelines, and then click Add Pipeline. The Add Pipeline dialog appears.
  2. In Name, enter a name for your Pipeline, such as Artifact Build and Deploy.
  3. Click SUBMIT. The new Pipeline is created.

Add the Build Workflow as the first stage in the Pipeline:

  1. In Pipeline Stages, click the plus button. The Pipeline Stage dialog appears.

  1. In Step Name, enter a name for the Build Stage, such as Build Artifact.
  2. In Execute Workflow, select the Build Workflow you created. When you are done, it will look something like this:

  1. Click SUBMIT. The stage is added to the Pipeline.
  2. Use the same steps to add the Deploy Workflow to the Pipeline. When you are done, it will look something like this:

  1. Click Deploy to run the Pipeline. Note that you do not need to select an artifact build number as the Deploy Workflow will obtain the latest build.
  2. Click SUBMIT.

The Workflows are run in succession. First, the Build Workflow is run. Click the Artifact Collection step to see the metadata collected by Harness, including the build number:

You can see the same build number in Jenkins:

Next, the Deploy Workflow is run. Click the Artifact Check step to see the same build number that was collected by the Artifact Collection step. You can also see the build number next to the Artifacts heading.

The Pipeline has been run successfully. You can now build and deploy artifacts by running a single Pipeline.

Next Step

How did we do?