kpm 0.8.2 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +73 -8
- data/README.adoc +37 -2
- data/docker/docker-compose.ci.mysql.yml +21 -0
- data/kpm.gemspec +4 -3
- data/lib/kpm/account.rb +3 -2
- data/lib/kpm/coordinates.rb +4 -3
- data/lib/kpm/database.rb +3 -2
- data/lib/kpm/formatter.rb +2 -2
- data/lib/kpm/inspector.rb +2 -2
- data/lib/kpm/killbill_server_artifact.rb +19 -10
- data/lib/kpm/migrations.rb +18 -4
- data/lib/kpm/nexus_helper/actions.rb +9 -5
- data/lib/kpm/nexus_helper/cloudsmith_api_calls.rb +85 -0
- data/lib/kpm/nexus_helper/github_api_calls.rb +70 -0
- data/lib/kpm/nexus_helper/nexus_api_calls_v2.rb +79 -50
- data/lib/kpm/plugins_directory.yml +8 -4
- data/lib/kpm/plugins_manager.rb +12 -5
- data/lib/kpm/tasks.rb +23 -7
- data/lib/kpm/tenant_config.rb +1 -1
- data/lib/kpm/tomcat_manager.rb +1 -0
- data/lib/kpm/version.rb +1 -1
- data/pom.xml +211 -40
- data/spec/kpm/remote/base_artifact_spec.rb +15 -13
- data/spec/kpm/remote/base_installer_spec.rb +13 -13
- data/spec/kpm/remote/cloudsmith_api_calls_spec.rb +109 -0
- data/spec/kpm/remote/github_api_calls_spec.rb +40 -0
- data/spec/kpm/remote/installer_spec.rb +30 -30
- data/spec/kpm/remote/kaui_artifact_spec.rb +4 -4
- data/spec/kpm/remote/killbill_plugin_artifact_spec.rb +19 -19
- data/spec/kpm/remote/killbill_server_artifact_spec.rb +13 -13
- data/spec/kpm/remote/migrations_spec.rb +9 -9
- data/spec/kpm/remote/nexus_facade_spec.rb +2 -2
- data/spec/kpm/remote/tenant_config_spec.rb +3 -3
- data/spec/kpm/remote/tomcat_manager_spec.rb +2 -2
- data/spec/kpm/unit/actions_spec.rb +2 -2
- data/spec/kpm/unit/base_artifact_spec.rb +14 -14
- data/spec/kpm/unit/inspector_spec.rb +28 -28
- data/spec/kpm/unit/installer_spec.rb +4 -4
- data/spec/kpm/unit/plugins_directory_spec.rb +31 -31
- data/spec/kpm/unit/plugins_manager_spec.rb +54 -54
- data/spec/kpm/unit/sha1_checker_spec.rb +2 -2
- data/spec/kpm/unit/uninstaller_spec.rb +21 -21
- data/spec/kpm/unit_mysql/account_spec.rb +13 -13
- data/spec/spec_helper.rb +1 -1
- metadata +27 -14
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'net/http'
|
4
|
+
require 'uri'
|
5
|
+
require 'rexml/document'
|
6
|
+
require 'openssl'
|
7
|
+
|
8
|
+
module KPM
|
9
|
+
module NexusFacade
|
10
|
+
class GithubApiCalls < NexusApiCallsV2
|
11
|
+
def pull_artifact_endpoint(coordinates)
|
12
|
+
base_path, versioned_artifact, = build_base_path_and_coords(coordinates)
|
13
|
+
"#{base_path}/#{versioned_artifact}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_artifact_info(coordinates)
|
17
|
+
super
|
18
|
+
|
19
|
+
_, versioned_artifact, coords = build_base_path_and_coords(coordinates)
|
20
|
+
sha1 = get_sha1(coordinates)
|
21
|
+
"<artifact-resolution>
|
22
|
+
<data>
|
23
|
+
<presentLocally>true</presentLocally>
|
24
|
+
<groupId>#{coords[:group_id]}</groupId>
|
25
|
+
<artifactId>#{coords[:artifact_id]}</artifactId>
|
26
|
+
<version>#{coords[:version]}</version>
|
27
|
+
<extension>#{coords[:packaging]}</extension>
|
28
|
+
<snapshot>#{!(coords[:version] =~ /-SNAPSHOT$/).nil?}</snapshot>
|
29
|
+
<sha1>#{sha1}</sha1>
|
30
|
+
<repositoryPath>/#{coords[:group_id].gsub('.', '/')}/#{versioned_artifact}</repositoryPath>
|
31
|
+
</data>
|
32
|
+
</artifact-resolution>"
|
33
|
+
end
|
34
|
+
|
35
|
+
def get_artifact_info_endpoint(coordinates)
|
36
|
+
base_path, = build_base_path_and_coords(coordinates)
|
37
|
+
"#{base_path}/maven-metadata.xml"
|
38
|
+
end
|
39
|
+
|
40
|
+
def search_for_artifact_endpoint(_coordinates)
|
41
|
+
raise NoMethodError, 'GitHub Packages has no search support'
|
42
|
+
end
|
43
|
+
|
44
|
+
def build_query_params(_coordinates, _what_parameters = nil)
|
45
|
+
''
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def get_sha1(coordinates)
|
51
|
+
base_path, versioned_artifact, = build_base_path_and_coords(coordinates)
|
52
|
+
endpoint = "#{base_path}/#{versioned_artifact}.sha1"
|
53
|
+
get_response_with_retries(coordinates, endpoint, nil)
|
54
|
+
end
|
55
|
+
|
56
|
+
def build_base_path_and_coords(coordinates)
|
57
|
+
coords = parse_coordinates(coordinates)
|
58
|
+
|
59
|
+
# The url may contain the org and repo, e.g. 'https://maven.pkg.github.com/killbill/qualpay-java-client'
|
60
|
+
org_and_repo = URI.parse(configuration[:url]).path
|
61
|
+
|
62
|
+
[
|
63
|
+
"#{org_and_repo}/#{coords[:group_id].gsub('.', '/')}/#{coords[:artifact_id]}",
|
64
|
+
"#{coords[:version]}/#{coords[:artifact_id]}-#{coords[:version]}.#{coords[:extension]}",
|
65
|
+
coords
|
66
|
+
]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -27,18 +27,13 @@ module KPM
|
|
27
27
|
|
28
28
|
# This is an extract and slim down of functions needed from nexus_cli to maintain the response expected by the base_artifact.
|
29
29
|
class NexusApiCallsV2
|
30
|
-
PULL_ARTIFACT_ENDPOINT = '/service/local/artifact/maven/redirect'
|
31
|
-
GET_ARTIFACT_INFO_ENDPOINT = '/service/local/artifact/maven/resolve'
|
32
|
-
SEARCH_FOR_ARTIFACT_ENDPOINT = '/service/local/lucene/search'
|
33
|
-
|
34
30
|
READ_TIMEOUT_DEFAULT = 60
|
35
31
|
OPEN_TIMEOUT_DEFAULT = 60
|
36
32
|
|
37
33
|
ERROR_MESSAGE_404 = 'The artifact you requested information for could not be found. Please ensure it exists inside the Nexus.'
|
38
34
|
|
39
|
-
attr_reader :version
|
40
|
-
|
41
|
-
attr_reader :ssl_verify
|
35
|
+
attr_reader :version, :configuration, :ssl_verify
|
36
|
+
|
42
37
|
attr_accessor :logger
|
43
38
|
|
44
39
|
def initialize(configuration, ssl_verify, logger)
|
@@ -49,12 +44,12 @@ module KPM
|
|
49
44
|
|
50
45
|
def search_for_artifacts(coordinates)
|
51
46
|
logger.debug "Entered - Search for artifact, coordinates: #{coordinates}"
|
52
|
-
response = get_response(coordinates,
|
47
|
+
response = get_response(coordinates, search_for_artifact_endpoint(coordinates), %i[g a])
|
53
48
|
|
54
49
|
case response.code
|
55
50
|
when '200'
|
56
51
|
logger.debug "response body: #{response.body}"
|
57
|
-
|
52
|
+
response.body
|
58
53
|
when '404'
|
59
54
|
raise StandardError, ERROR_MESSAGE_404
|
60
55
|
else
|
@@ -63,41 +58,18 @@ module KPM
|
|
63
58
|
end
|
64
59
|
|
65
60
|
def get_artifact_info(coordinates)
|
66
|
-
|
67
|
-
response = get_response(coordinates, GET_ARTIFACT_INFO_ENDPOINT, nil)
|
68
|
-
|
69
|
-
case response.code
|
70
|
-
when '200'
|
71
|
-
logger.debug "response body: #{response.body}"
|
72
|
-
return response.body
|
73
|
-
when '404'
|
74
|
-
raise StandardError, ERROR_MESSAGE_404
|
75
|
-
else
|
76
|
-
raise UnexpectedStatusCodeException, response.code
|
77
|
-
end
|
61
|
+
get_response_with_retries(coordinates, get_artifact_info_endpoint(coordinates), nil)
|
78
62
|
end
|
79
63
|
|
80
64
|
def pull_artifact(coordinates, destination)
|
81
|
-
logger.debug "Entered - Pull artifact, coordinates: #{coordinates}"
|
82
65
|
file_name = get_file_name(coordinates)
|
83
66
|
destination = File.join(File.expand_path(destination || '.'), file_name)
|
84
|
-
logger.debug "destination: #{destination}"
|
85
|
-
response = get_response(coordinates, PULL_ARTIFACT_ENDPOINT, nil)
|
86
|
-
|
87
|
-
case response.code
|
88
|
-
when '301', '307'
|
89
|
-
location = response['Location'].gsub!(configuration[:url], '')
|
90
|
-
logger.debug 'fetching artifact'
|
91
|
-
file_response = get_response(nil, location, nil)
|
67
|
+
logger.debug { "Downloading to destination: #{destination}" }
|
92
68
|
|
93
|
-
|
94
|
-
|
95
|
-
end
|
96
|
-
when 404
|
97
|
-
raise StandardError, ERROR_MESSAGE_404
|
98
|
-
else
|
99
|
-
raise UnexpectedStatusCodeException, response.code
|
69
|
+
File.open(destination, 'wb') do |io|
|
70
|
+
io.write(get_response_with_retries(coordinates, pull_artifact_endpoint(coordinates), nil))
|
100
71
|
end
|
72
|
+
|
101
73
|
{
|
102
74
|
file_name: file_name,
|
103
75
|
file_path: File.expand_path(destination),
|
@@ -106,6 +78,31 @@ module KPM
|
|
106
78
|
}
|
107
79
|
end
|
108
80
|
|
81
|
+
def pull_artifact_endpoint(_coordinates)
|
82
|
+
'/service/local/artifact/maven/redirect'
|
83
|
+
end
|
84
|
+
|
85
|
+
def get_artifact_info_endpoint(_coordinates)
|
86
|
+
'/service/local/artifact/maven/resolve'
|
87
|
+
end
|
88
|
+
|
89
|
+
def search_for_artifact_endpoint(_coordinates)
|
90
|
+
'/service/local/lucene/search'
|
91
|
+
end
|
92
|
+
|
93
|
+
def build_query_params(coordinates, what_parameters = nil)
|
94
|
+
artifact = parse_coordinates(coordinates)
|
95
|
+
@version = artifact[:version].to_s.upcase
|
96
|
+
|
97
|
+
query = { g: artifact[:group_id], a: artifact[:artifact_id], e: artifact[:extension], v: version, r: configuration[:repository] }
|
98
|
+
query.merge!(c: artifact[:classifier]) unless artifact[:classifier].nil?
|
99
|
+
|
100
|
+
params = what_parameters.nil? ? query : {}
|
101
|
+
what_parameters.each { |key| params[key] = query[key] unless query[key].nil? } unless what_parameters.nil?
|
102
|
+
|
103
|
+
params.map { |key, value| "#{key}=#{value}" }.join('&')
|
104
|
+
end
|
105
|
+
|
109
106
|
private
|
110
107
|
|
111
108
|
def parse_coordinates(coordinates)
|
@@ -139,17 +136,33 @@ module KPM
|
|
139
136
|
end
|
140
137
|
end
|
141
138
|
|
142
|
-
def
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
params = what_parameters.nil? ? query : {}
|
150
|
-
what_parameters.each { |key| params[key] = query[key] unless query[key].nil? } unless what_parameters.nil?
|
139
|
+
def get_response_with_retries(coordinates, endpoint, what_parameters)
|
140
|
+
logger.debug { "Fetching coordinates=#{coordinates}, endpoint=#{endpoint}, params=#{what_parameters}" }
|
141
|
+
response = get_response(coordinates, endpoint, what_parameters)
|
142
|
+
logger.debug { "Response body: #{response.body}" }
|
143
|
+
process_response_with_retries(response)
|
144
|
+
end
|
151
145
|
|
152
|
-
|
146
|
+
def process_response_with_retries(response)
|
147
|
+
case response.code
|
148
|
+
when '200'
|
149
|
+
response.body
|
150
|
+
when '301', '307'
|
151
|
+
location = response['Location']
|
152
|
+
logger.debug { "Following redirect to #{location}" }
|
153
|
+
|
154
|
+
new_path = location.gsub!(configuration[:url], '')
|
155
|
+
if new_path.nil?
|
156
|
+
# Redirect to another domain (e.g. CDN)
|
157
|
+
get_raw_response_with_retries(location)
|
158
|
+
else
|
159
|
+
get_response_with_retries(nil, location, nil)
|
160
|
+
end
|
161
|
+
when '404'
|
162
|
+
raise StandardError, ERROR_MESSAGE_404
|
163
|
+
else
|
164
|
+
raise UnexpectedStatusCodeException, response.code
|
165
|
+
end
|
153
166
|
end
|
154
167
|
|
155
168
|
def get_response(coordinates, endpoint, what_parameters)
|
@@ -157,11 +170,18 @@ module KPM
|
|
157
170
|
query_params = build_query_params(coordinates, what_parameters) unless coordinates.nil?
|
158
171
|
endpoint = endpoint_with_params(endpoint, query_params) unless coordinates.nil?
|
159
172
|
request = Net::HTTP::Get.new(endpoint)
|
173
|
+
if configuration.key?(:username) && configuration.key?(:password)
|
174
|
+
request.basic_auth(configuration[:username], configuration[:password])
|
175
|
+
elsif configuration.key?(:token)
|
176
|
+
request['Authorization'] = "token #{configuration[:token]}"
|
177
|
+
end
|
160
178
|
|
161
|
-
logger.debug
|
179
|
+
logger.debug do
|
180
|
+
http.set_debug_output(logger)
|
181
|
+
"HTTP path: #{endpoint}"
|
182
|
+
end
|
162
183
|
|
163
|
-
|
164
|
-
response
|
184
|
+
http.request(request)
|
165
185
|
end
|
166
186
|
|
167
187
|
def build_http
|
@@ -171,9 +191,18 @@ module KPM
|
|
171
191
|
http.read_timeout = configuration[:read_timeout] || READ_TIMEOUT_DEFAULT # seconds
|
172
192
|
http.use_ssl = (ssl_verify != false)
|
173
193
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless ssl_verify
|
194
|
+
|
195
|
+
logger.debug { "HTTP connection: #{http.inspect}" }
|
196
|
+
|
174
197
|
http
|
175
198
|
end
|
176
199
|
|
200
|
+
def get_raw_response_with_retries(location)
|
201
|
+
response = Net::HTTP.get_response(URI(location))
|
202
|
+
logger.debug { "Response body: #{response.body}" }
|
203
|
+
process_response_with_retries(response)
|
204
|
+
end
|
205
|
+
|
177
206
|
def endpoint_with_params(endpoint, query_params)
|
178
207
|
"#{endpoint}?#{URI::DEFAULT_PARSER.escape(query_params)}"
|
179
208
|
end
|
@@ -13,17 +13,21 @@
|
|
13
13
|
:versions:
|
14
14
|
:0.18: 4.2.5
|
15
15
|
:0.20: 6.0.1
|
16
|
-
:0.22: 7.
|
16
|
+
:0.22: 7.2.3
|
17
17
|
:avatax:
|
18
18
|
:type: :java
|
19
19
|
:versions:
|
20
20
|
:0.18: 0.4.1
|
21
21
|
:0.20: 0.6.1
|
22
|
-
:0.22: 0.
|
22
|
+
:0.22: 0.8.2
|
23
23
|
:cybersource:
|
24
24
|
:type: :ruby
|
25
25
|
:versions:
|
26
26
|
:0.18: 5.2.7
|
27
|
+
:deposit:
|
28
|
+
:type: :java
|
29
|
+
:versions:
|
30
|
+
:0.22: 0.0.2
|
27
31
|
:dwolla:
|
28
32
|
:type: :java
|
29
33
|
:versions:
|
@@ -34,7 +38,7 @@
|
|
34
38
|
:versions:
|
35
39
|
:0.18: 0.3.1
|
36
40
|
:0.20: 0.5.1
|
37
|
-
:0.22: 0.
|
41
|
+
:0.22: 0.7.1
|
38
42
|
:forte:
|
39
43
|
:type: :java
|
40
44
|
:versions:
|
@@ -76,4 +80,4 @@
|
|
76
80
|
:stripe:
|
77
81
|
:type: :java
|
78
82
|
:versions:
|
79
|
-
:0.22: 7.0
|
83
|
+
:0.22: 7.3.0
|
data/lib/kpm/plugins_manager.rb
CHANGED
@@ -10,6 +10,15 @@ module KPM
|
|
10
10
|
@logger = logger
|
11
11
|
end
|
12
12
|
|
13
|
+
def create_symbolic_link(path, link)
|
14
|
+
FileUtils.rm_f(link)
|
15
|
+
FileUtils.ln_s(path, link, force: true)
|
16
|
+
rescue Errno::EACCES
|
17
|
+
@logger.warn('Unable to create symbolic link LATEST, will copy the directory')
|
18
|
+
FileUtils.rm_rf(link)
|
19
|
+
FileUtils.cp_r(path, link)
|
20
|
+
end
|
21
|
+
|
13
22
|
def set_active(plugin_name_or_path, plugin_version = nil)
|
14
23
|
if plugin_name_or_path.nil?
|
15
24
|
@logger.warn('Unable to mark a plugin as active: no name or path specified')
|
@@ -19,8 +28,7 @@ module KPM
|
|
19
28
|
if plugin_version.nil?
|
20
29
|
# Full path specified, with version
|
21
30
|
link = Pathname.new(plugin_name_or_path).join('../SET_DEFAULT')
|
22
|
-
|
23
|
-
FileUtils.ln_s(plugin_name_or_path, link, force: true)
|
31
|
+
create_symbolic_link(plugin_name_or_path, link)
|
24
32
|
else
|
25
33
|
# Plugin name (fs directory) specified
|
26
34
|
plugin_dir_glob = @plugins_dir.join('*').join(plugin_name_or_path)
|
@@ -28,8 +36,7 @@ module KPM
|
|
28
36
|
Dir.glob(plugin_dir_glob).each do |plugin_dir_path|
|
29
37
|
plugin_dir = Pathname.new(plugin_dir_path)
|
30
38
|
link = plugin_dir.join('SET_DEFAULT')
|
31
|
-
|
32
|
-
FileUtils.ln_s(plugin_dir.join(plugin_version), link, force: true)
|
39
|
+
create_symbolic_link(plugin_dir.join(plugin_version), link)
|
33
40
|
end
|
34
41
|
end
|
35
42
|
|
@@ -179,7 +186,7 @@ module KPM
|
|
179
186
|
end
|
180
187
|
end
|
181
188
|
|
182
|
-
#
|
189
|
+
# NOTE: the plugin name here is the directory name on the filesystem
|
183
190
|
def update_fs(plugin_name_or_path, plugin_version = nil)
|
184
191
|
if plugin_name_or_path.nil?
|
185
192
|
@logger.warn('Unable to update the filesystem: no name or path specified')
|
data/lib/kpm/tasks.rb
CHANGED
@@ -72,6 +72,22 @@ module KPM
|
|
72
72
|
Uninstaller.new(options[:destination]).uninstall_non_default_plugins(options[:dry_run])
|
73
73
|
end
|
74
74
|
|
75
|
+
method_option :group_id,
|
76
|
+
type: :string,
|
77
|
+
default: KillbillServerArtifact::KILLBILL_GROUP_ID,
|
78
|
+
desc: 'The Kill Bill war artifact group-id'
|
79
|
+
method_option :artifact_id,
|
80
|
+
type: :string,
|
81
|
+
default: KillbillServerArtifact::KILLBILL_ARTIFACT_ID,
|
82
|
+
desc: 'The Kill Bill war artifact id'
|
83
|
+
method_option :packaging,
|
84
|
+
type: :string,
|
85
|
+
default: KillbillServerArtifact::KILLBILL_PACKAGING,
|
86
|
+
desc: 'The Kill Bill war packaging'
|
87
|
+
method_option :classifier,
|
88
|
+
type: :string,
|
89
|
+
default: KillbillServerArtifact::KILLBILL_CLASSIFIER,
|
90
|
+
desc: 'The Kill Bill war classifier'
|
75
91
|
method_option :destination,
|
76
92
|
type: :string,
|
77
93
|
default: nil,
|
@@ -93,10 +109,10 @@ module KPM
|
|
93
109
|
installer = BaseInstaller.new(logger,
|
94
110
|
options[:overrides],
|
95
111
|
options[:ssl_verify])
|
96
|
-
response = installer.install_killbill_server(
|
97
|
-
|
98
|
-
|
99
|
-
|
112
|
+
response = installer.install_killbill_server(options[:group_id],
|
113
|
+
options[:artifact_id],
|
114
|
+
options[:packaging],
|
115
|
+
options[:classifier],
|
100
116
|
version,
|
101
117
|
options[:destination],
|
102
118
|
options[:bundles_dir],
|
@@ -483,7 +499,7 @@ module KPM
|
|
483
499
|
desc 'account', 'export/import accounts'
|
484
500
|
def account
|
485
501
|
config_file = nil
|
486
|
-
raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https
|
502
|
+
raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://\S+}.match(options[:killbill_url]).nil?
|
487
503
|
|
488
504
|
raise Interrupt, '--killbill_api_credentials, required format -> <api_key> <api_secrets>' if options[:killbill_api_credentials] && options[:killbill_api_credentials].size != 2
|
489
505
|
|
@@ -535,7 +551,7 @@ module KPM
|
|
535
551
|
desc: 'Killbill URL ex. http://127.0.0.1:8080'
|
536
552
|
desc 'tenant_config', 'export all tenant-level configs.'
|
537
553
|
def tenant_config
|
538
|
-
raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https
|
554
|
+
raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://\S+}.match(options[:killbill_url]).nil?
|
539
555
|
|
540
556
|
raise Interrupt, '--killbill_api_credentials, required format -> <api_key> <api_secrets>' if options[:killbill_api_credentials] && options[:killbill_api_credentials].size != 2
|
541
557
|
|
@@ -608,7 +624,7 @@ module KPM
|
|
608
624
|
def diagnostic
|
609
625
|
raise Interrupt, '--account_export, please provide a valid account id' if options[:account_export] && options[:account_export] == 'account_export'
|
610
626
|
|
611
|
-
raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https
|
627
|
+
raise Interrupt, '--killbill_url, required format -> http(s)://something' if options[:killbill_url] && %r{https?://\S+}.match(options[:killbill_url]).nil?
|
612
628
|
|
613
629
|
raise Interrupt, '--killbill_api_credentials, required format -> <api_key> <api_secrets>' if options[:killbill_api_credentials] && options[:killbill_api_credentials].size != 2
|
614
630
|
|
data/lib/kpm/tenant_config.rb
CHANGED
@@ -81,7 +81,7 @@ module KPM
|
|
81
81
|
}
|
82
82
|
|
83
83
|
begin
|
84
|
-
|
84
|
+
KillBillClient::Model::Tenant.search_tenant_config(key_prefix, options)
|
85
85
|
rescue KillBillClient::API::Unauthorized
|
86
86
|
raise ArgumentError, "Unable to export tenant details, wrong credentials? username=#{@killbill_user}, password=#{mask(@killbill_password)}, api_key=#{@killbill_api_key}, api_secret=#{mask(@killbill_api_secret)}"
|
87
87
|
end
|
data/lib/kpm/tomcat_manager.rb
CHANGED
data/lib/kpm/version.rb
CHANGED
data/pom.xml
CHANGED
@@ -1,45 +1,216 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<!--
|
3
|
-
~ Copyright 2014
|
4
|
-
~
|
5
|
-
~
|
6
|
-
~
|
7
|
-
~
|
8
|
-
~
|
9
|
-
~
|
10
|
-
~
|
11
|
-
~
|
12
|
-
~
|
13
|
-
~
|
14
|
-
~
|
15
|
-
~
|
16
|
-
|
17
|
-
|
3
|
+
~ Copyright 2010-2014 Ning, Inc.
|
4
|
+
~ Copyright 2014-2020 Groupon, Inc
|
5
|
+
~ Copyright 2020-2020 Equinix, Inc
|
6
|
+
~ Copyright 2014-2020 The Billing Project, LLC
|
7
|
+
~
|
8
|
+
~ The Billing Project licenses this file to you under the Apache License, version 2.0
|
9
|
+
~ (the "License"); you may not use this file except in compliance with the
|
10
|
+
~ License. You may obtain a copy of the License at:
|
11
|
+
~
|
12
|
+
~ http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
~
|
14
|
+
~ Unless required by applicable law or agreed to in writing, software
|
15
|
+
~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
16
|
+
~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
17
|
+
~ License for the specific language governing permissions and limitations
|
18
|
+
~ under the License.
|
19
|
+
-->
|
18
20
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
19
21
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
20
|
-
|
21
|
-
<groupId>org.
|
22
|
-
<artifactId>
|
23
|
-
<version>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
22
|
+
<modelVersion>4.0.0</modelVersion>
|
23
|
+
<groupId>org.kill-bill.billing.installer</groupId>
|
24
|
+
<artifactId>kpm</artifactId>
|
25
|
+
<version>0.10.2</version>
|
26
|
+
<packaging>pom</packaging>
|
27
|
+
<name>KPM</name>
|
28
|
+
<description>KPM: the Kill Bill Package Manager</description>
|
29
|
+
<url>http://github.com/killbill/killbill-cloud</url>
|
30
|
+
<inceptionYear>2010</inceptionYear>
|
31
|
+
<licenses>
|
32
|
+
<license>
|
33
|
+
<name>Apache License 2.0</name>
|
34
|
+
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
|
35
|
+
<distribution>repo</distribution>
|
36
|
+
</license>
|
37
|
+
</licenses>
|
38
|
+
<developers>
|
39
|
+
<developer>
|
40
|
+
<id>pierre</id>
|
41
|
+
<name>Pierre-Alexandre Meyer</name>
|
42
|
+
<email>pierre@mouraf.org</email>
|
43
|
+
</developer>
|
44
|
+
<developer>
|
45
|
+
<id>stephane</id>
|
46
|
+
<name>Stephane Brossier</name>
|
47
|
+
</developer>
|
48
|
+
</developers>
|
49
|
+
<mailingLists>
|
50
|
+
<mailingList>
|
51
|
+
<name>Kill Bill users</name>
|
52
|
+
<subscribe>killbilling-users+subscribe@googlegroups.com</subscribe>
|
53
|
+
<unsubscribe>killbilling-users+unsubscribe@googlegroups.com</unsubscribe>
|
54
|
+
<post>killbilling-users@googlegroups.com</post>
|
55
|
+
<archive>http://groups.google.com/group/killbilling-users</archive>
|
56
|
+
</mailingList>
|
57
|
+
</mailingLists>
|
58
|
+
<scm>
|
59
|
+
<connection>scm:git:git://github.com/killbill/killbill-cloud.git</connection>
|
60
|
+
<url>https://github.com/killbill/killbill-cloud/</url>
|
61
|
+
<developerConnection>scm:git:git@github.com:killbill/killbill-cloud.git</developerConnection>
|
62
|
+
</scm>
|
63
|
+
<issueManagement>
|
64
|
+
<system>Github</system>
|
65
|
+
<url>https://github.com/killbill/killbill-cloud/issues</url>
|
66
|
+
</issueManagement>
|
67
|
+
<distributionManagement>
|
68
|
+
<repository>
|
69
|
+
<id>${repository.release.id}</id>
|
70
|
+
<name>${repository.release.name}</name>
|
71
|
+
<url>${repository.release.url}</url>
|
72
|
+
</repository>
|
73
|
+
<snapshotRepository>
|
74
|
+
<id>${repository.snapshot.id}</id>
|
75
|
+
<name>${repository.snapshot.name}</name>
|
76
|
+
<url>${repository.snapshot.url}</url>
|
77
|
+
</snapshotRepository>
|
78
|
+
</distributionManagement>
|
79
|
+
<properties>
|
80
|
+
<repository.release.id>sonatype-nexus-staging</repository.release.id>
|
81
|
+
<repository.release.name>Nexus Release Repository</repository.release.name>
|
82
|
+
<repository.release.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</repository.release.url>
|
83
|
+
<repository.snapshot.id>sonatype-nexus-snapshots</repository.snapshot.id>
|
84
|
+
<repository.snapshot.name>Sonatype Nexus Snapshots</repository.snapshot.name>
|
85
|
+
<repository.snapshot.url>https://oss.sonatype.org/content/repositories/snapshots/</repository.snapshot.url>
|
86
|
+
</properties>
|
87
|
+
<build>
|
88
|
+
<pluginManagement>
|
89
|
+
<plugins>
|
90
|
+
<plugin>
|
91
|
+
<artifactId>maven-compiler-plugin</artifactId>
|
92
|
+
<executions>
|
93
|
+
<execution>
|
94
|
+
<id>default-compile</id>
|
95
|
+
<phase>none</phase>
|
96
|
+
</execution>
|
97
|
+
<execution>
|
98
|
+
<id>default-testCompile</id>
|
99
|
+
<phase>none</phase>
|
100
|
+
</execution>
|
101
|
+
</executions>
|
102
|
+
</plugin>
|
103
|
+
<plugin>
|
104
|
+
<artifactId>maven-install-plugin</artifactId>
|
105
|
+
<executions>
|
106
|
+
<execution>
|
107
|
+
<id>default-install</id>
|
108
|
+
<phase>none</phase>
|
109
|
+
</execution>
|
110
|
+
</executions>
|
111
|
+
</plugin>
|
112
|
+
<plugin>
|
113
|
+
<artifactId>maven-resources-plugin</artifactId>
|
114
|
+
<executions>
|
115
|
+
<execution>
|
116
|
+
<id>default-resources</id>
|
117
|
+
<phase>none</phase>
|
118
|
+
</execution>
|
119
|
+
<execution>
|
120
|
+
<id>default-testResources</id>
|
121
|
+
<phase>none</phase>
|
122
|
+
</execution>
|
123
|
+
</executions>
|
124
|
+
</plugin>
|
125
|
+
<plugin>
|
126
|
+
<artifactId>maven-surefire-plugin</artifactId>
|
127
|
+
<executions>
|
128
|
+
<execution>
|
129
|
+
<id>default-test</id>
|
130
|
+
<phase>none</phase>
|
131
|
+
</execution>
|
132
|
+
</executions>
|
133
|
+
</plugin>
|
134
|
+
</plugins>
|
135
|
+
</pluginManagement>
|
136
|
+
<plugins>
|
137
|
+
<plugin>
|
138
|
+
<groupId>org.codehaus.mojo</groupId>
|
139
|
+
<artifactId>build-helper-maven-plugin</artifactId>
|
140
|
+
<version>3.2.0</version>
|
141
|
+
<executions>
|
142
|
+
<execution>
|
143
|
+
<id>attach-artifacts</id>
|
144
|
+
<phase>package</phase>
|
145
|
+
<goals>
|
146
|
+
<goal>attach-artifact</goal>
|
147
|
+
</goals>
|
148
|
+
<configuration>
|
149
|
+
<artifacts>
|
150
|
+
<artifact>
|
151
|
+
<file>kpm-${project.version}-linux-x86.tar.gz</file>
|
152
|
+
<type>tar.gz</type>
|
153
|
+
<classifier>linux-x86</classifier>
|
154
|
+
</artifact>
|
155
|
+
<artifact>
|
156
|
+
<file>kpm-${project.version}-linux-x86_64.tar.gz</file>
|
157
|
+
<type>tar.gz</type>
|
158
|
+
<classifier>linux-x86_64</classifier>
|
159
|
+
</artifact>
|
160
|
+
<artifact>
|
161
|
+
<file>kpm-${project.version}-osx.tar.gz</file>
|
162
|
+
<type>tar.gz</type>
|
163
|
+
<classifier>osx</classifier>
|
164
|
+
</artifact>
|
165
|
+
</artifacts>
|
166
|
+
</configuration>
|
167
|
+
</execution>
|
168
|
+
</executions>
|
169
|
+
</plugin>
|
170
|
+
</plugins>
|
171
|
+
</build>
|
172
|
+
<profiles>
|
173
|
+
<profile>
|
174
|
+
<id>sonatype-oss-release</id>
|
175
|
+
<build>
|
176
|
+
<plugins>
|
177
|
+
<plugin>
|
178
|
+
<groupId>org.apache.maven.plugins</groupId>
|
179
|
+
<artifactId>maven-gpg-plugin</artifactId>
|
180
|
+
<version>1.6</version>
|
181
|
+
<executions>
|
182
|
+
<execution>
|
183
|
+
<id>sign-artifacts</id>
|
184
|
+
<phase>verify</phase>
|
185
|
+
<goals>
|
186
|
+
<goal>sign</goal>
|
187
|
+
</goals>
|
188
|
+
<configuration>
|
189
|
+
<!-- Prevent `gpg` from using pinentry programs -->
|
190
|
+
<gpgArguments>
|
191
|
+
<arg>--pinentry-mode</arg>
|
192
|
+
<arg>loopback</arg>
|
193
|
+
</gpgArguments>
|
194
|
+
</configuration>
|
195
|
+
</execution>
|
196
|
+
</executions>
|
197
|
+
</plugin>
|
198
|
+
<plugin>
|
199
|
+
<groupId>org.sonatype.plugins</groupId>
|
200
|
+
<artifactId>nexus-staging-maven-plugin</artifactId>
|
201
|
+
<version>1.6.8</version>
|
202
|
+
<extensions>true</extensions>
|
203
|
+
<configuration>
|
204
|
+
<serverId>ossrh-releases</serverId>
|
205
|
+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
206
|
+
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
|
207
|
+
<keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
|
208
|
+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
209
|
+
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
|
210
|
+
</configuration>
|
211
|
+
</plugin>
|
212
|
+
</plugins>
|
213
|
+
</build>
|
214
|
+
</profile>
|
215
|
+
</profiles>
|
45
216
|
</project>
|