Skip to content

shyamz-22/newrelic-deployment-resource

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker

New Relic Resource for Concourse

An output only opinionated concourse resource for adding deployment markers in New Relic

New Relic Deployment markers

Details of Deployment markers can be found here

Source Configuration

  • api_key: Required. Rest API key for adding deployment markers to an application
  • user: Required. This Username will appear in the deployments dashboard

out: Add a deployment marker

In order to add an deployment marker, a revision number and a description may be provided to the New Relic API.

For this purpose provide a git resource in the put step so that New Relic concourse resource takes the revision from (SHA of origin/HEAD commit) and description from (Commit message of origin/HEAD commit).

  • git_src_directory: Required. source code of the deployed version. Format is /tmp/build/put/<<name of git resource>>
  • api_url: Mandatory. Deployment REST api endpoint
  • app_id: Optional (deprecated in favour of api_url) Application ID from New Relic, if api_url is not provided this defaults to US API endpoint

Example Pipeline

resource_types:
- name: newrelic-deployment-marker
  type: docker-image
  source:
    repository: shyamz22/newrelic-resource
    tag: latest

resources:
- name: src
  type: git
  source:
    uri: [email protected]:shyamz-22/PactIt.git
    branch: master
    private_key: ((git-key))

- name: deployment-marker
  type: newrelic-deployment-marker
  source:
    api_key: ((newrelic-rest-api-key))
    user: [email protected]


jobs:

- name: deploy
  plan:
  - get: src # <-- 🤓 source code of deployed app
    trigger: true
  - task: deploy
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: alpine
      inputs:
      - name: src
      run:
        path: sh
        args:
        - -exc
        - |
          export TERM=dumb
          set -x

          # deploy
          echo "deployment-successful"
  on_success:
    put: deployment-marker
    params:
      git_src_directory: /tmp/build/put/src # <-- 🤓
      api_url: https://api.newrelic.com/v2/applications/((app-id))/deployments.json

About

A concourse resource for adding newrelic deployment markers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published