Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seuros/capistrano-newrelic
New Relic integration for Capistrano 3
https://github.com/seuros/capistrano-newrelic
Last synced: about 2 months ago
JSON representation
New Relic integration for Capistrano 3
- Host: GitHub
- URL: https://github.com/seuros/capistrano-newrelic
- Owner: seuros
- License: other
- Created: 2013-11-28T13:28:09.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-10-24T17:12:54.000Z (almost 5 years ago)
- Last Synced: 2024-05-11T23:43:01.827Z (5 months ago)
- Language: Ruby
- Homepage: https://github.com/seuros/capistrano-newrelic
- Size: 20.5 KB
- Stars: 27
- Watchers: 5
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem Version](https://badge.fury.io/rb/capistrano-newrelic.svg)](https://badge.fury.io/rb/capistrano-newrelic)
# 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:
```ruby
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:
```ruby
# 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, ""# 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 log0.0.9:
* Added changelog capture for git
* Populate revision with `current_revision` from scm if available;
i.e., the git SHA0.0.8:
* Hook was removed, please set it in your deploy.rb or deploy/'stage'.rb
```ruby
before 'deploy:finished', 'newrelic:notice_deployment'
```* Revision can be set with :
```ruby
set :newrelic_revision, "Your text here"
```
or
```ruby
$ 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