Harness Plugin

Published on January 30th, 2023

Introduction

The Backstage Harness plugin integrates with Harness to show your build information inside Backstage where it can be associated with your services.

harness-exec-history.png

Add Harness to one of your components

Add the needed Harness annotation(s)

The Harness plugin enables 3 usable annotations that are available to correctly identify the Harness pipelines.

The available annotation can be seen below on the example catalog-info.yaml file:

metadata:
  annotations:
    # mandatory annotation
    harness.io/project-url: <harness_project_url>

    # optional annotations
    # harness.io/ci-pipelineIds: <pipelineId1,pipelineId2,pipelineId3 etc>
    # harness.io/cd-serviceId: <serviceId>

To find the correct values to use for annotations, refer to the official plugin documentation in their GitHub repository.

Create and add an API Key

Generate an API key on your Harness account using the official API key generation instruction on Harness website.

Then add it to Roadie at https://<tenant-name>.roadie.so/administration/harness by entering the token value from above into HARNESS_API_KEY.

Enable and configure the plugin

In the same Harness configuration section, enable the relevant Harness proxy to be able retrieve information from Harness.io. Additionally, you can disable the possibility to run pipelines via Roadie UI if needed.

harness-settings

Configure Roadie UI to display Harness information

In Roadie, find and select a relevant entity via the Catalog page or using Search.

Click the plus icon on the tab bar to add a new plugin for your component.

Select the EntityHarnessCiCdContent card from the drop-down and click Create.

You should now see your Harness pipeline runs inside Roadie!

References