Skip to content

Add reusable pipeline for publishing OHI to New Relic Control catalog#192

Open
jcoscollanr wants to merge 3 commits into
newrelic:mainfrom
jcoscollanr:main
Open

Add reusable pipeline for publishing OHI to New Relic Control catalog#192
jcoscollanr wants to merge 3 commits into
newrelic:mainfrom
jcoscollanr:main

Conversation

@jcoscollanr

Copy link
Copy Markdown

Why

Clients can use new relic control, to install and manage agents in their infrastructure. We have already NRInfra, NRDot and some more.

We are working now on giving support for OHI's. So clients can manage their redis,postgresql etc... and push configuration changes through the agent control.

What

This PR gives a generic pipeline for other repos to call that:

  1. Downloads the version of the OHI from release artifacts
  2. Mangles to have only the binaries
  3. Uploads to an OCI repository with the version as a tag
  4. Signs the binary
  5. Makes a call to instrumentation-metadata to add the new OHI version to the catalog of available agents.

Notes

  1. source_repo and metadata_git_ref are there since I did this PR from a fork and for testing puposes.
  2. The secrets will still be provided in each OHI repo

@jcoscollanr jcoscollanr self-assigned this Jul 9, 2026
@jcoscollanr jcoscollanr marked this pull request as ready for review July 10, 2026 07:40
@jcoscollanr jcoscollanr requested a review from a team as a code owner July 10, 2026 07:40

@sairaj18 sairaj18 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this change, left few comments.

echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Resolve metadata git ref

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This step is missing set -euo pipefail that every other run block has

echo "ref=${REF:-${{ steps.validate.outputs.tag }}}" >> "$GITHUB_OUTPUT"

- name: Upload to Agent Metadata
uses: newrelic/agent-metadata-action@main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of referring main can we use a released tag or commit. This will make sure downstream change to the action doesn't change how every OHI publishes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

oci-registry: ${{ inputs.oci_registry }}
oci-username: ${{ secrets.OCI_USERNAME }}
oci-password: ${{ secrets.OCI_PASSWORD }}
apm-control-nr-license-key: ${{ secrets.APM_CONTROL_NR_LICENSE_KEY_STAGING }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using APM_CONTROL_NR_LICENSE_KEY_STAGING i.e a staging license key, Is it because we are adding agent-control OHI support only for staging as of now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the github action is a go binary. and it's instrumented so if there are errors we can receive alerts etc...

This is env variable is just the license key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants