GithubHelp home page GithubHelp logo

seuros / capistrano-newrelic Goto Github PK

View Code? Open in Web Editor NEW
27.0 5.0 19.0 21 KB

New Relic integration for Capistrano 3

Home Page: https://github.com/seuros/capistrano-newrelic

License: Other

Ruby 100.00%

capistrano-newrelic's Introduction

Gem Version

Capistrano::Newrelic

Installation

Add this line to your application's Gemfile:

gem 'capistrano-newrelic'

And then execute:

$ bundle

Or install it yourself as:

$ gem install capistrano-newrelic

Usage

In Capfile

require 'capistrano/newrelic'

In stage files

In your Capfile, or stage configuration files for multi-stage configuration add:

    before 'deploy:finished', 'newrelic:notice_deployment'

License key and application name are retrieved from config/newrelic.yml based on the environment setting (defaults to value of rails_env, rack_env and can be overridden by setting newrelic_env).

In deploy.rb

Configurable options, shown here with defaults:

      # New Relic Application Name to deploy to.  Default to :application if no value set
      set :newrelic_appname, ""

      # New Relic environment to deploy to. Sets config based on section of newrelic.yml
      set :newrelic_env, fetch(:stage, fetch(:rack_env, fetch(:rails_env, 'production')))

      # Deployment changelog defaults to the git changelog, if using git
      set :newrelic_changelog, "<git changelog if available>"

      # Deployment description
      set :newrelic_desc, ""

      # Deploy user if set will be used instead of the VCS user.
      set :newrelic_deploy_user

Changelog

0.0.10:

  • Use git --no-pager option when printing the log

0.0.9:

  • Added changelog capture for git
  • Populate revision with current_revision from scm if available; i.e., the git SHA

0.0.8:

  • Hook was removed, please set it in your deploy.rb or deploy/'stage'.rb
before 'deploy:finished', 'newrelic:notice_deployment'
  • Revision can be set with :
set :newrelic_revision, "Your text here"

or

$ NEWRELIC_REVISION='Your text here' bundle exe cap ....

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

capistrano-newrelic's People

Contributors

jeremycrussell avatar jisk avatar morgoth avatar nparry avatar seuros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

capistrano-newrelic's Issues

Revision should be configurable

In newrelic's cap2 integration you can set the revision - here it's hardcoded to the release timestamp which isn't a revision hash.

Move hook to user deploy files

The hook shouldn't be set automatically, but manually in user files. Normally I don't want to notify the deployment in every stage, I just want it in the production one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.