Skip to content

New Relic Application Deployment Marker

Actions
Apply a New Relic application deployment marker to an application that is monitored by New Relic
v2.5.1
Latest
Verified creator
Star (62)

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

Community Project header

New Relic Application Deployment Marker

GitHub Marketplace version

A GitHub Action to add New Relic deployment markers during your release pipeline.

Inputs

Key Required Default Description
guid yes - The entity GUID to apply the deployment marker.
apiKey yes - Your New Relic personal API key.
changelog no - A summary of what changed in this deployment, visible in the Deployments page.
commit no - The Commit SHA for this deployment, visible in the Deployments page.
description no - A high-level description of this deployment, visible in the Overview page and on the Deployments page when you select an individual deployment.
deeplink no - A deep link to the source which triggered the deployment.
deploymenttype no BASIC The type of deployment. Choose from BASIC, BLUE_GREEN, CANARY, OTHER, ROLLING, or SHADOW.
groupid no - A group ID for the deployment to link to other deployments.
region no US The region of your New Relic account. Default: US
version yes - Metadata to apply to the deployment marker - e.g. the latest release tag
user yes github.actor A username to associate with the deployment, visible in the Overview page and on the Deployments page.

Example usage

GitHub secrets

Github secrets assumed to be set:

  • NEW_RELIC_API_KEY - Personal API key
  • NEW_RELIC_DEPLOYMENT_ENTITY_GUID - New Relic Entity GUID to create the marker on

There are a number of default GitHub environment variables that are used in these examples as well.

Minimum required fields

name: Change Tracking Marker
on:
  - release
      types: [published]

jobs:
  newrelic:
    runs-on: ubuntu-latest
    name: New Relic
    steps:
      # This step builds a var with the release tag value to use later
      - name: Set Release Version from Tag
        run: echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
      # This step creates a new Change Tracking Marker
      - name: New Relic Application Deployment Marker
        uses: newrelic/[email protected]
        with:
          apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
          region: "US"
          guid: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID }}
          version: "${{ env.RELEASE_VERSION }}"
          user: "${{ github.actor }}"

All input fields

In addition to NEW_RELIC_API_KEY, this example shows how to target multiple items by storing multiple secrets like "NEW_RELIC_DEPLOYMENT_ENTITY_GUID_<ID>", where <ID> is the unique identifier for the target item.

NEW_RELIC_DEPLOYMENT_ENTITY_GUID_App123
NEW_RELIC_DEPLOYMENT_ENTITY_GUID_App456
NEW_RELIC_DEPLOYMENT_ENTITY_GUID_App789
name: Change Tracking Marker
on:
  workflow_dispatch:
  release:
    types: [published]

jobs:
  newrelic:
    runs-on: ubuntu-latest
    name: New Relic
    steps:
      # This step builds a var with the release tag value to use later
      - name: Set Release Version from Tag
        run: echo "RELEASE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
      # This step creates a new Change Tracking Marker for App123
      - name: App123 Marker
        uses: newrelic/[email protected]
        with:
          apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
          region: "US"
          guid: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID_App123 }}
          version: "${{ env.RELEASE_VERSION }}"
          changelog: "https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md"
          commit: "${{ github.sha }}"
          description: "Automated Release via Github Actions"
          deploymenttype: "ROLLING"
          groupId: "Workshop App Release: ${{ github.ref_name }}"
          user: "${{ github.actor }}"
      # This step creates a new Change Tracking Marker for App
      - name: App456 Marker
        uses: newrelic/[email protected]
        with:
          apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
          region: "US"
          guid: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID_App456 }}
          version: "${{ env.RELEASE_VERSION }}"
          changelog: "https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md"
          commit: "${{ github.sha }}"
          description: "Automated Release via Github Actions"
          deploymenttype: "ROLLING"
          groupId: "Workshop App Release: ${{ github.ref_name }}"
          user: "${{ github.actor }}"
      # This step creates a new Change Tracking Marker for App789
      - name: App789 Marker
        uses: newrelic/[email protected]
        with:
          apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
          region: "US"
          guid: ${{ secrets.NEW_RELIC_DEPLOYMENT_ENTITY_GUID_App789 }}
          version: "${{ env.RELEASE_VERSION }}"
          changelog: "https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md"
          commit: "${{ github.sha }}"
          description: "Automated Release via Github Actions"
          deploymenttype: "ROLLING"
          groupId: "Workshop App Release: ${{ github.ref_name }}"
          user: "${{ github.actor }}"
      # When chaining steps together, the deployment id is placeed into the github environment 
      - name: View output
        run: echo "${{ env.deploymentId }}"

New Relic Application Deployment Marker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Apply a New Relic application deployment marker to an application that is monitored by New Relic
v2.5.1
Latest

Verified

GitHub has manually verified the creator of the action as an official partner organization. For more info see About badges in GitHub Marketplace.

New Relic Application Deployment Marker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.