renuo-cli 4.20.0 → 4.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/lib/renuo/cli/commands/ci/setup.rb +26 -0
- data/lib/renuo/cli/commands/ci/update_deploio_app.rb +6 -10
- data/lib/renuo/cli/commands/create_deploio_app.rb +1 -1
- data/lib/renuo/cli/commands/debug.rb +69 -16
- data/lib/renuo/cli/services/deploio.rb +61 -5
- data/lib/renuo/cli/services/hetzner.rb +62 -0
- data/lib/renuo/cli/templates/semaphore/semaphore-deploy.yml.erb +1 -0
- data/lib/renuo/cli/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de8f99bc222386ca1ac0dd81b673d3a4382de875269d5df20aa06a3099ddef36
|
|
4
|
+
data.tar.gz: 7c6a5239dba6bef5d5e7ce46c3da8f8c6a9e6a3ba28cbfea237743bd4a65e136
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4fa9db9c017993228f783134a4bf03b11327436daadfcbb3dbc518519e017115b59011658e86d29147689fe0a1c5f1ecca975e45af36ed873d373379c8e4114a
|
|
7
|
+
data.tar.gz: f9626e0a2508da563348ab54f35a361556466fe17d0bc37866d2f7eb7d3b3a070c3769e4145b94bd48e0718062fa9f31f871c64de070bea89b902a7e3d41e3dc
|
data/README.md
CHANGED
|
@@ -24,6 +24,21 @@ Run `bundle exec ruby -Ilib ./bin/renuo` to run the executable. (e.g. `ruby -Ili
|
|
|
24
24
|
|
|
25
25
|
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
26
26
|
|
|
27
|
+
### Testing commands in the shell
|
|
28
|
+
|
|
29
|
+
The easiest way to test the CLI during development is to temporarily add the local `bin` directory to your `PATH`:
|
|
30
|
+
|
|
31
|
+
```shell
|
|
32
|
+
export PATH="$PWD/bin:$PATH"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This binds the `renuo` command to your local version, so you can run commands directly:
|
|
36
|
+
|
|
37
|
+
```shell
|
|
38
|
+
renuo -h
|
|
39
|
+
renuo generate_github_settings
|
|
40
|
+
```
|
|
41
|
+
|
|
27
42
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
28
43
|
|
|
29
44
|
To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Renuo::Cli::Commands::Ci
|
|
4
|
+
class Setup
|
|
5
|
+
command "ci setup" do |c|
|
|
6
|
+
c.syntax = "renuo ci setup"
|
|
7
|
+
c.summary = "Installs and logs in to nctl."
|
|
8
|
+
c.description = c.summary
|
|
9
|
+
c.action { new.run }
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def run
|
|
13
|
+
system! "echo 'deb [trusted=yes] https://repo.nine.ch/deb/ /' " \
|
|
14
|
+
"| sudo tee /etc/apt/sources.list.d/repo.nine.ch.list"
|
|
15
|
+
system! "sudo apt-get update -qqo Dir::Etc::sourcelist=/etc/apt/sources.list.d/repo.nine.ch.list"
|
|
16
|
+
system! "sudo apt-get install -qq nctl"
|
|
17
|
+
system! "nctl auth login"
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def system!(cmd)
|
|
23
|
+
abort unless system cmd
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -7,6 +7,7 @@ module Renuo::Cli::Commands::Ci
|
|
|
7
7
|
c.summary = "Updates a Deploio app."
|
|
8
8
|
c.description = c.summary
|
|
9
9
|
c.option "-d", "--docker", "If the app uses a Dockerfile"
|
|
10
|
+
c.option "-g", "--git-revision <hash>", String, "The Git revision"
|
|
10
11
|
c.option "-p", "--project <name>", String, "The name of the project"
|
|
11
12
|
c.example "renuo ci update-deploio-app main -dp renuo-dashboard",
|
|
12
13
|
"Updates the 'main' app of the 'renuo-dashboard' project using a Dockerfile"
|
|
@@ -14,27 +15,22 @@ module Renuo::Cli::Commands::Ci
|
|
|
14
15
|
end
|
|
15
16
|
|
|
16
17
|
def run
|
|
17
|
-
system! "
|
|
18
|
-
system! "echo 'deb [trusted=yes] https://repo.nine.ch/deb/ /' " \
|
|
19
|
-
"| sudo tee /etc/apt/sources.list.d/repo.nine.ch.list"
|
|
20
|
-
system! "sudo apt-get update -qqo Dir::Etc::sourcelist=/etc/apt/sources.list.d/repo.nine.ch.list"
|
|
21
|
-
system! "sudo apt-get install -qq nctl"
|
|
22
|
-
system! "nctl auth login"
|
|
23
|
-
system! "nctl update app #{@app} -p #{@project} --env APP_REVISION=$SEMAPHORE_GIT_SHA " \
|
|
18
|
+
system! "nctl update app #{@app} -p #{@project} --env APP_REVISION=#{@git_revision} " \
|
|
24
19
|
"#{"--build-env RUBY_VERSION=#{File.read(".ruby-version").strip} " if @docker}" \
|
|
25
|
-
"--git-revision
|
|
20
|
+
"--git-revision #{@git_revision} --skip-repo-access-check"
|
|
26
21
|
end
|
|
27
22
|
|
|
28
23
|
private
|
|
29
24
|
|
|
30
25
|
def initialize(args, options)
|
|
31
26
|
@app = args.first
|
|
32
|
-
@project = options.project
|
|
33
27
|
@docker = options.docker
|
|
28
|
+
@git_revision = options.git_revision || ENV.fetch("SEMAPHORE_GIT_SHA", nil)
|
|
29
|
+
@project = options.project
|
|
34
30
|
|
|
35
31
|
abort "missing app name" unless @app
|
|
36
32
|
abort "missing project name" unless @project
|
|
37
|
-
abort "
|
|
33
|
+
abort "missing Git revision" unless @git_revision
|
|
38
34
|
end
|
|
39
35
|
|
|
40
36
|
def system!(cmd)
|
|
@@ -160,7 +160,7 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
|
|
|
160
160
|
--project=#{@project_name_with_org_prefix} \\
|
|
161
161
|
--postgres-database-version=#{@postgres_version} \\
|
|
162
162
|
--location=nine-es34 \\
|
|
163
|
-
--backup-schedule=daily
|
|
163
|
+
--backup-schedule=daily \\
|
|
164
164
|
--collation=C.UTF-8
|
|
165
165
|
OUTPUT
|
|
166
166
|
end
|
|
@@ -3,22 +3,26 @@
|
|
|
3
3
|
require_relative "../services/cache"
|
|
4
4
|
require_relative "../services/deploio"
|
|
5
5
|
require_relative "../services/heroku"
|
|
6
|
+
require_relative "../services/hetzner"
|
|
7
|
+
require "shellwords"
|
|
6
8
|
|
|
7
|
-
class Renuo::Cli::Commands::Debug
|
|
9
|
+
class Renuo::Cli::Commands::Debug # rubocop:disable Metrics/ClassLength
|
|
8
10
|
Cache = Renuo::Cli::Services::Cache
|
|
9
11
|
Deploio = Renuo::Cli::Services::Deploio
|
|
10
12
|
Heroku = Renuo::Cli::Services::Heroku
|
|
13
|
+
Hetzner = Renuo::Cli::Services::Hetzner
|
|
11
14
|
|
|
12
15
|
command "debug" do |c|
|
|
13
16
|
c.syntax = "renuo debug <app-name or domain>"
|
|
14
17
|
c.summary = "Shortcut to debug apps"
|
|
15
18
|
c.description = <<~DESC
|
|
16
19
|
Enter the container or show logs of the available apps on Heroku or Deploio.
|
|
17
|
-
The command will show a menu with all found targets.
|
|
20
|
+
The command will show a menu with all found targets across all organizations.
|
|
18
21
|
It will only use a cache. You must manually update the cache with option 1).
|
|
19
22
|
DESC
|
|
20
23
|
c.option "-H", "--heroku", "Show only Heroku apps"
|
|
21
24
|
c.option "-d", "--deploio", "Show only Deploio apps"
|
|
25
|
+
c.option "-z", "--hetzner", "Show only Hetzner vms"
|
|
22
26
|
c.action do |args, options|
|
|
23
27
|
new.run(args, options)
|
|
24
28
|
rescue Interrupt
|
|
@@ -33,46 +37,56 @@ class Renuo::Cli::Commands::Debug
|
|
|
33
37
|
query = args[0]
|
|
34
38
|
abort(">> Please provide an app name or domain.") if query.blank?
|
|
35
39
|
|
|
36
|
-
cloud_unspecified = !options.heroku && !options.deploio
|
|
40
|
+
cloud_unspecified = !options.heroku && !options.deploio && !options.hetzner
|
|
37
41
|
should_scan_heroku = options.heroku || cloud_unspecified
|
|
38
42
|
should_scan_deploio = options.deploio || cloud_unspecified
|
|
43
|
+
should_scan_hetzner = options.hetzner || cloud_unspecified
|
|
39
44
|
|
|
40
45
|
choose do |menu| # rubocop:todo Metrics/BlockLength
|
|
41
46
|
deploio_cache_info = "Deploio: #{Cache.stored_at("deploio_apps") || "never"}"
|
|
42
47
|
heroku_cache_info = "Heroku: #{Cache.stored_at("heroku_apps") || "never"}"
|
|
48
|
+
hetzner_cache_info = "Hetzner: #{Cache.stored_at("hetzner_vms") || "never"}"
|
|
43
49
|
|
|
44
|
-
menu.choice "Update caches (#{deploio_cache_info}, #{heroku_cache_info})" do
|
|
50
|
+
menu.choice "Update caches (#{deploio_cache_info}, #{heroku_cache_info}, #{hetzner_cache_info})" do
|
|
45
51
|
if should_scan_deploio
|
|
46
52
|
say "Updating Deploio cache"
|
|
47
53
|
Cache.store("deploio_apps", Deploio.fetch_apps)
|
|
54
|
+
Cache.store("deploio_vms", Deploio.fetch_vms)
|
|
48
55
|
end
|
|
49
56
|
if should_scan_heroku
|
|
50
57
|
say "Updating Heroku cache..."
|
|
51
58
|
Cache.store("heroku_apps", Heroku.fetch_apps)
|
|
52
59
|
end
|
|
60
|
+
if should_scan_hetzner
|
|
61
|
+
say "Updating Hetzner cache..."
|
|
62
|
+
Cache.store("hetzner_vms", Hetzner.fetch_vms)
|
|
63
|
+
end
|
|
53
64
|
say "Caches updated"
|
|
54
65
|
end
|
|
55
66
|
|
|
56
67
|
open_cmds = []
|
|
57
68
|
|
|
58
|
-
# rubocop:disable Layout/LineLength
|
|
59
69
|
if should_scan_deploio && Cache.stored_at("deploio_apps")
|
|
60
70
|
select_deploio_targets(query).each do |app|
|
|
61
|
-
|
|
62
|
-
menu.choice(
|
|
71
|
+
bash_display_cmd, bash_exec_cmd = nctl_command(app, "exec", "bash")
|
|
72
|
+
menu.choice(bash_display_cmd) { exec bash_exec_cmd.squish }
|
|
63
73
|
|
|
64
|
-
|
|
65
|
-
menu.choice(
|
|
74
|
+
bundle_display_cmd, bundle_exec_cmd = nctl_command(app, "exec", "bundle exec rails console")
|
|
75
|
+
menu.choice(bundle_display_cmd) { exec bundle_exec_cmd.squish }
|
|
66
76
|
|
|
67
|
-
|
|
68
|
-
menu.choice(
|
|
77
|
+
logs_display_cmd, logs_exec_cmd = nctl_command(app, "logs", "-f")
|
|
78
|
+
menu.choice(logs_display_cmd) { exec logs_exec_cmd.squish }
|
|
69
79
|
|
|
70
|
-
app[:hosts].each
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
app[:hosts].each { |host| open_cmds << "open https://#{host}" }
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if should_scan_deploio && Cache.stored_at("deploio_vms")
|
|
85
|
+
select_deploio_vm_targets(query).each do |vm|
|
|
86
|
+
bash_cmd = "ssh root@#{vm[:fqdn]} docker ps"
|
|
87
|
+
menu.choice(bash_cmd) { exec bash_cmd.squish }
|
|
73
88
|
end
|
|
74
89
|
end
|
|
75
|
-
# rubocop:enable Layout/LineLength
|
|
76
90
|
|
|
77
91
|
if should_scan_heroku && Cache.stored_at("heroku_apps")
|
|
78
92
|
select_heroku_targets(query).each do |app|
|
|
@@ -91,6 +105,14 @@ class Renuo::Cli::Commands::Debug
|
|
|
91
105
|
end
|
|
92
106
|
end
|
|
93
107
|
|
|
108
|
+
if should_scan_hetzner && Cache.stored_at("hetzner_vms")
|
|
109
|
+
select_hetzner_vm_targets(query).each do |vm|
|
|
110
|
+
bash_cmd = "ssh root@#{vm[:fqdn] || vm[:public_ip]} docker ps"
|
|
111
|
+
menu.choice(bash_cmd) { exec bash_cmd.squish }
|
|
112
|
+
open_cmds << "open https://console.hetzner.com/projects/#{vm[:project_id]}/servers/#{vm[:id]}"
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
94
116
|
open_cmds.uniq.each do |cmd|
|
|
95
117
|
menu.choice(cmd) { exec cmd.squish }
|
|
96
118
|
end
|
|
@@ -104,7 +126,38 @@ class Renuo::Cli::Commands::Debug
|
|
|
104
126
|
|
|
105
127
|
def select_deploio_targets(query)
|
|
106
128
|
Cache.restore("deploio_apps").select do |app|
|
|
107
|
-
app[:name].include?(query) ||
|
|
129
|
+
app[:name].include?(query) ||
|
|
130
|
+
app[:namespace].include?(query) ||
|
|
131
|
+
app[:hosts].any? { |host| host.include?(query) }
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
def nctl_command(app, subcommand, trailing_args)
|
|
136
|
+
plain = "nctl #{subcommand} app #{app[:name]} #{trailing_args} --project #{app[:namespace]}"
|
|
137
|
+
display = "nctl #{bold(subcommand)} app #{bold(app[:name])} #{trailing_args} --project #{bold(app[:namespace])}"
|
|
138
|
+
with_deploio_org(app, display, plain)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def with_deploio_org(app, display_command, exec_command)
|
|
142
|
+
organization = app[:organization].to_s
|
|
143
|
+
return [display_command, exec_command] if organization.empty?
|
|
144
|
+
|
|
145
|
+
display_cmd = "nctl auth set-org #{bold(Shellwords.escape(organization))} && #{display_command}"
|
|
146
|
+
exec_cmd = "nctl auth set-org #{Shellwords.escape(organization)} && #{exec_command}"
|
|
147
|
+
[display_cmd, exec_cmd]
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def select_deploio_vm_targets(query)
|
|
151
|
+
Cache.restore("deploio_vms").select do |vm|
|
|
152
|
+
vm[:name].include?(query) || vm[:namespace].include?(query) ||
|
|
153
|
+
vm[:hostname].include?(query) || vm[:ip].include?(query) ||
|
|
154
|
+
vm[:reverse_dns].include?(query) || vm[:fqdn].include?(query)
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
def select_hetzner_vm_targets(query)
|
|
159
|
+
Cache.restore("hetzner_vms").select do |vm|
|
|
160
|
+
vm[:name].include?(query) || vm[:public_ip].include?(query) || vm[:fqdn]&.include?(query)
|
|
108
161
|
end
|
|
109
162
|
end
|
|
110
163
|
|
|
@@ -1,19 +1,75 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "shellwords"
|
|
4
|
+
|
|
3
5
|
class Renuo::Cli::Services::Deploio
|
|
4
6
|
class << self
|
|
5
7
|
def fetch_apps
|
|
6
|
-
|
|
7
|
-
stdout, stderr, status = Open3.capture3 fetch_apps_cmd
|
|
8
|
-
raise "Error fetching Deploio app list: #{stderr}" unless status.success?
|
|
8
|
+
active_org, available_orgs = fetch_whoami_orgs
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
available_orgs.flat_map do |organization|
|
|
11
|
+
set_organization(organization)
|
|
12
|
+
parse_apps(fetch_apps_yaml, organization)
|
|
13
|
+
end
|
|
14
|
+
ensure
|
|
15
|
+
set_organization(active_org)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def fetch_whoami_orgs
|
|
19
|
+
stdout, = run_nctl_command('nctl auth whoami -o "yaml"')
|
|
20
|
+
whoami = YAML.safe_load(stdout)
|
|
21
|
+
|
|
22
|
+
[whoami["organization"], whoami["orgs"]]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def parse_apps(yaml, organization)
|
|
26
|
+
YAML.load_stream(yaml).filter_map do |app|
|
|
11
27
|
name = app.dig("metadata", "name")
|
|
12
28
|
namespace = app.dig("metadata", "namespace")
|
|
13
29
|
spec_hosts = app.dig("spec", "forProvider", "hosts") || []
|
|
14
30
|
|
|
15
|
-
{ name: name, namespace: namespace, hosts: spec_hosts }
|
|
31
|
+
{ name: name, namespace: namespace, hosts: spec_hosts, organization: organization }
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def fetch_vms
|
|
36
|
+
fetch_vms_cmd = %(nctl get cloudvm -A -o yaml)
|
|
37
|
+
stdout, stderr, status = Open3.capture3 fetch_vms_cmd
|
|
38
|
+
raise "Error fetching Deploio app list: #{stderr}" unless status.success?
|
|
39
|
+
|
|
40
|
+
YAML.load_stream(stdout).map do |app|
|
|
41
|
+
{
|
|
42
|
+
name: app.dig("metadata", "name"),
|
|
43
|
+
namespace: app.dig("metadata", "namespace"),
|
|
44
|
+
hostname: app.dig("spec", "forProvider", "hostname"),
|
|
45
|
+
ip: app.dig("status", "atProvider", "ipAddress"),
|
|
46
|
+
reverse_dns: app.dig("status", "atProvider", "reverseDNS"),
|
|
47
|
+
fqdn: app.dig("status", "atProvider", "fqdn")
|
|
48
|
+
}
|
|
16
49
|
end
|
|
17
50
|
end
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
def set_organization(organization) # rubocop:disable Naming/AccessorMethodName
|
|
55
|
+
return if organization.strip.empty?
|
|
56
|
+
|
|
57
|
+
_, stderr, status = run_nctl_command("nctl auth set-org #{Shellwords.escape(organization)}")
|
|
58
|
+
return if status.success?
|
|
59
|
+
|
|
60
|
+
raise "Error switching Deploio organization to #{organization}: #{stderr}"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def run_nctl_command(cmd)
|
|
64
|
+
stdout, stderr, status = Open3.capture3(cmd)
|
|
65
|
+
raise "Error fetching Deploio app list: #{stderr}" unless status.success?
|
|
66
|
+
|
|
67
|
+
[stdout, stderr, status]
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def fetch_apps_yaml
|
|
71
|
+
stdout, = run_nctl_command("nctl get apps -A -o yaml")
|
|
72
|
+
stdout
|
|
73
|
+
end
|
|
18
74
|
end
|
|
19
75
|
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "net/http"
|
|
4
|
+
|
|
5
|
+
module Renuo::Cli::Services::Hetzner
|
|
6
|
+
class << self
|
|
7
|
+
LIST_TOKENS_CMD = "op item list --tags renuo-cli-debug-hetzner-token --format=json"
|
|
8
|
+
EXTRACT_CREDENTIALS_CMD = "op item get --reveal --field credential,project_id"
|
|
9
|
+
def fetch_vms
|
|
10
|
+
tokens = read_tokens
|
|
11
|
+
tokens.flat_map do |token_and_project|
|
|
12
|
+
token, project_id = token_and_project.split(",")
|
|
13
|
+
client = Client.new(token)
|
|
14
|
+
client.list_servers.map { |s| s.merge(project_id: project_id.to_i) }
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def read_tokens
|
|
21
|
+
stdout, stderr, status = Open3.capture3("#{LIST_TOKENS_CMD} | #{EXTRACT_CREDENTIALS_CMD}")
|
|
22
|
+
raise "Failed to fetch Hetzner tokens: #{stderr}" unless status.success?
|
|
23
|
+
|
|
24
|
+
stdout.split("\n").map(&:strip).reject(&:empty?)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class Client
|
|
29
|
+
def initialize(token)
|
|
30
|
+
@token = token
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
BASE_URL = "https://api.hetzner.cloud/v1/"
|
|
34
|
+
|
|
35
|
+
def list_servers
|
|
36
|
+
response = get("servers")
|
|
37
|
+
raise "Error fetching Hetzner servers: #{response.body}" unless response.is_a?(Net::HTTPSuccess)
|
|
38
|
+
|
|
39
|
+
data = JSON.parse(response.body)
|
|
40
|
+
data["servers"].map do |server|
|
|
41
|
+
{
|
|
42
|
+
id: server["id"],
|
|
43
|
+
name: server["name"],
|
|
44
|
+
status: server["status"],
|
|
45
|
+
public_ip: server.dig("public_net", "ipv4", "ip"),
|
|
46
|
+
private_ip: server.dig("private_net", 0, "ip"),
|
|
47
|
+
fqdn: server.dig("public_net", "ipv4", "dns_ptr")
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def get(resource)
|
|
53
|
+
uri = URI("#{BASE_URL}#{resource}")
|
|
54
|
+
req = Net::HTTP::Get.new(uri)
|
|
55
|
+
req["Authorization"] = "Bearer #{@token}"
|
|
56
|
+
|
|
57
|
+
Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
|
|
58
|
+
http.request(req)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
data/lib/renuo/cli/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: renuo-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.21.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Renuo AG
|
|
@@ -66,6 +66,7 @@ files:
|
|
|
66
66
|
- lib/renuo/cli.rb
|
|
67
67
|
- lib/renuo/cli/commands/check_deploio_status.rb
|
|
68
68
|
- lib/renuo/cli/commands/ci/check_deploio_status.rb
|
|
69
|
+
- lib/renuo/cli/commands/ci/setup.rb
|
|
69
70
|
- lib/renuo/cli/commands/ci/update_deploio_app.rb
|
|
70
71
|
- lib/renuo/cli/commands/commit_leaderboard_stage.rb
|
|
71
72
|
- lib/renuo/cli/commands/commit_leaderboard_sync.rb
|
|
@@ -96,6 +97,7 @@ files:
|
|
|
96
97
|
- lib/renuo/cli/services/cloudfront_config_service.rb
|
|
97
98
|
- lib/renuo/cli/services/deploio.rb
|
|
98
99
|
- lib/renuo/cli/services/heroku.rb
|
|
100
|
+
- lib/renuo/cli/services/hetzner.rb
|
|
99
101
|
- lib/renuo/cli/services/renuo_cli_config.rb
|
|
100
102
|
- lib/renuo/cli/templates/semaphore/bin/cache_restore.erb
|
|
101
103
|
- lib/renuo/cli/templates/semaphore/bin/cache_store.erb
|