For the complete documentation index, see llms.txt. This page is also available as Markdown.

Jenkins using Custom Integrations

Send Jenkins build data into Harness IDP with a Custom Integration and show it on your catalog entities, using the built-in Jenkins source.

You can bring Jenkins build data into Harness IDP with a Custom Integration. You create the integration that uses the Build schema, push a record from your Jenkins pipeline after each run, and the data appears on a dedicated tab on the matching catalog entity.

Jenkins build data on a catalog entity

Before you begin

  • The IDP_INTEGRATIONS and IDP_CUSTOM_INTEGRATION feature flags must be enabled for your account. Contact Harness Support to enable them.

  • You need permissions to create and edit integrations at the scope where you are working.

  • You need a Harness Service Account Token (SAT) or Personal Access Token (PAT), that your pipeline uses to authenticate.

  • You need a catalog entity to attach the build data to.


Step 1: Create the integration

To create the integration, complete the following steps:

  1. In Harness IDP, go to Configure → Integrations.

  2. Select Custom Integrations at the top right, then select + New Custom Integration.

    Custom Integrations tab and New Custom Integration button
  3. In Setup & Identity, enter a name in Integration Name. The ID is generated from this name and becomes part of the endpoint URL, so it cannot be changed later.


Step 2: Configure the integration

To configure the integration, complete the following steps:

  1. Under Integration Configuration, select the API card. Jenkins will push data to Harness from a pipeline step.

  2. Set Data schema to Build. The prefilled Build schema covers the fields produced by a Jenkins run, so a custom schema is not required.

  3. Set Source to Jenkins.

    Data schema set to Build and Source set to Jenkins
  4. (Optional) Under Correlation Mapping, map a payload field to a catalog attribute if you are not sending entity_ref in the payload. For example, map service to metadata.name. Go to Configure Correlation Mapping to set up the mapping.

  5. Select Confirm & Enable.


Step 3: Know the endpoint

To find the endpoint, complete the following steps:

  1. Open the integration you created, and go to its Overview tab.

  2. Copy the Upsert Endpoint. It has this shape:

Overview tab showing the Upsert endpoint and Build schema

Authentication uses your SAT or PAT, passed in the x-api-key header. Go to Ingest data to review the full header and payload details.


Step 4: Push build data from Jenkins

You can have a step at the end of your Jenkins pipeline that sends a build record to the Upsert endpoint. The authentication method and the schema to be passed to the endpoint are shown on the same page.

identifier is the record's key. Reuse the same value across a run to update the record in place, for example pushing RUNNING when the build starts and SUCCESS when it finishes. Use a genuinely unique value per build, such as the Jenkins build number.

The following is a sample curl request:

Store your Harness Token as a Jenkins credential secret rather than hardcoding it. Confirm the push landed on the integration's Events tab. Go to Monitor ingestion to track each push.


Step 5: Add the Jenkins tab to your entity layout

You can surface the ingested data by adding a tab to the entity layout. This is a one-time step per entity kind and type.

  1. Go to Configure → Layout → Catalog Entities.

  2. Edit the layout for the entity kind and type that your builds correlate to, for example kind Component, type Service.

  3. In the YAML editor, add a Jenkins tab. Unlike a plain Custom Integration tab, the Jenkins tab sets source: jenkins and uses a config.columns block (as shown in the below YAML snippet) to lay out the columns, including a Tests column driven by customData:

    Layout for Jenkins tab
  4. Click Save.

Go to View data in the catalog to review the general layout mechanics.


Step 6: View the data

Open the entity in the Catalog and select the Jenkins tab, or the tab name you configured in the layout.

Each build appears as a row with its source branch, build name, test summary, status, duration, and timestamp. Select a row to open the full record.

Jenkins tab with build rows, filters, and record details

Two dropdowns above the table let you filter the builds:

  • Integration: Lists the Jenkins Custom Integration(s) contributing to this entity, so you can view builds from one integration at a time. This tab shows builds from Jenkins-source integrations, and not from other build tools.

  • Status: Filters by build status.

The Tests column shows the number of passed, skipped, and total tests for each record.

Rendered Records

Assume the below upserted values to check how data is displayed in the Tests column of Jenkins tab:

passed

skipped

total

Tests column shows

100

10

110

100/110 Passed (10 Skipped)

100

0

110

100/110 Passed

100

Not provided

Not provided

100 Passed

Last updated

Was this helpful?