Skip to content

Commit 12929e7

Browse files
Merge pull request #3299 from newrelic/remove_capistrano_and_cli_deployments
Remove `newrelic deployments` and Capistrano support
2 parents 46d7a64 + a72ad96 commit 12929e7

File tree

92 files changed

+2
-1120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2
-1120
lines changed

.github/workflows/scripts/slack_notifications/supported_gems.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ aws-sdk-kinesis
77
aws-sdk-lambda
88
aws-sdk-sqs
99
bunny
10-
capistrano
1110
concurrent-ruby
1211
curb
1312
dalli

.rubocop_todo.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Metrics/AbcSize:
2222
Exclude:
2323
- 'lib/new_relic/agent/configuration/default_source.rb'
2424
- infinite_tracing/test/**/*
25-
- lib/new_relic/cli/commands/deployments.rb
2625
- test/**/*
2726

2827
Metrics/CollectionLiteralLength:
@@ -34,7 +33,6 @@ Minitest/AssertRaisesCompoundBody:
3433
Exclude:
3534
- 'test/new_relic/agent/collector_response_code_test.rb'
3635
- 'test/new_relic/agent/new_relic_service_test.rb'
37-
- 'test/new_relic/cli/commands/deployments_test.rb'
3836

3937
# Offense count: 4
4038
Minitest/DuplicateTestRun:

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ For complete documentation on installing the New Relic Ruby agent, see the follo
7777
* [Update the agent](https://docs.newrelic.com/docs/agents/ruby-agent/installation/update-ruby-agent)
7878
* [Uninstall the Ruby agent](https://docs.newrelic.com/docs/agents/ruby-agent/installation/uninstall-ruby-agent)
7979

80-
### Recording deploys
81-
82-
The Ruby agent supports recording deployments in New Relic via a command line
83-
tool or Capistrano recipes. For more information on these features, see
84-
[our deployment documentation](http://docs.newrelic.com/docs/ruby/recording-deployments-with-the-ruby-agent)
85-
for more information.
86-
8780
## Support
8881

8982
Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels.

bin/newrelic

100755100644
File mode changed.

lib/new_relic/agent/configuration/default_source.rb

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -213,20 +213,6 @@ def self.host
213213
end
214214
end
215215

216-
def self.api_host
217-
# only used for deployment task
218-
proc do
219-
api_version = if NewRelic::Agent.config[:api_key].nil? || NewRelic::Agent.config[:api_key].empty?
220-
'rpm'
221-
else
222-
'api'
223-
end
224-
api_region = 'eu.' if String(NewRelic::Agent.config[:license_key]).start_with?('eu')
225-
226-
"#{api_version}.#{api_region}newrelic.com"
227-
end
228-
end
229-
230216
def self.convert_to_regexp_list(raw_value)
231217
value_list = convert_to_list(raw_value)
232218
value_list.map do |value|
@@ -422,14 +408,6 @@ def self.enforce_fallback(allowed_values: nil, fallback: nil)
422408
:allowed_from_server => true,
423409
:description => 'For agent versions 3.5.0 or higher, [set your Apdex T via the New Relic UI](/docs/apm/new-relic-apm/apdex/changing-your-apdex-settings).'
424410
},
425-
:api_key => {
426-
:default => '',
427-
:public => true,
428-
:type => String,
429-
:allowed_from_server => false,
430-
:exclude_from_reported_settings => true,
431-
:description => '# DEPRECATED: The `api_key` config setting is now deprecated. Its only use was for the `newrelic deployments` command, which is being removed in agent version 10.0.0.'
432-
},
433411
:backport_fast_active_record_connection_lookup => {
434412
:default => false,
435413
:public => true,
@@ -2326,20 +2304,6 @@ def self.enforce_fallback(allowed_values: nil, fallback: nil)
23262304
:allowed_from_server => true,
23272305
:description => 'If true, attempt to keep the TCP connection to the collector alive between harvests.'
23282306
},
2329-
:api_host => {
2330-
:default => DefaultSource.api_host,
2331-
:public => false,
2332-
:type => String,
2333-
:allowed_from_server => false,
2334-
:description => 'API host for New Relic.'
2335-
},
2336-
:api_port => {
2337-
:default => value_of(:port),
2338-
:public => false,
2339-
:type => Integer,
2340-
:allowed_from_server => false,
2341-
:description => 'Port for the New Relic API host.'
2342-
},
23432307
:application_id => {
23442308
:default => '',
23452309
:public => false,

lib/new_relic/cli/command.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
require 'optparse'
66

7-
# Run the command given by the first argument. Right
8-
# now all we have is deployments. We hope to have other
9-
# kinds of events here later.
7+
# Run the command given by the first argument.
8+
# Commands can be found in the commands/ directory.
109
$LOAD_PATH << "#{File.dirname(__FILE__)}/.."
1110
module NewRelic
1211
module Cli
@@ -73,8 +72,6 @@ def self.run
7372
end
7473
extra = options.order!
7574
command = extra.shift
76-
# just make it a little easier on them
77-
command = 'deployments' if command.include?('deploy')
7875
if command.nil?
7976
STDERR.puts options
8077
elsif !@command_names.include?(command)

lib/new_relic/cli/commands/deployments.rb

Lines changed: 0 additions & 206 deletions
This file was deleted.

lib/new_relic/control/server_methods.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ def server
1515
@remote_server ||= server_from_host(nil)
1616
end
1717

18-
# the server we should contact for api requests, like uploading
19-
# deployments and the like
20-
def api_server
21-
@api_server ||= NewRelic::Control::Server.new(Agent.config[:api_host], Agent.config[:api_port])
22-
end
23-
2418
def server_from_host(hostname = nil)
2519
NewRelic::Control::Server.new(hostname || Agent.config[:host], Agent.config[:port])
2620
end

lib/new_relic/recipes.rb

Lines changed: 0 additions & 24 deletions
This file was deleted.

lib/new_relic/recipes/capistrano3.rb

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)