renuo-cli 4.13.1 → 4.15.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f29f59d1b339dbf630b264c737ad8358f497d21e75984afdd713df6f1565862a
4
- data.tar.gz: f59a91b4affd80bca51a39aaa2eac422d8cb48cf238b374971718494b60c9f80
3
+ metadata.gz: 803278ba1e1fc8859287b68a32e3c3545afbaea2423f1a6eb3a8d5754d777f65
4
+ data.tar.gz: fb96573c7ae9899aa951ec5af5a11d2e6f8be58f753af48243095a7bb6e6f75d
5
5
  SHA512:
6
- metadata.gz: decd6d992aae7db5886fa12abda324b594ab6286775fc73db70c747ed8ea95e96d729583001bb7feda0ba56c92c2998a4405b63f55bd3515f59f1ea288252fdb
7
- data.tar.gz: 66668a5318434fce311e3627412a7066d68b1b89846354cea7d36b1164968f47668f0201d6fca8e7fd4858197ec553727996579555dd08618653e22240ee5991
6
+ metadata.gz: d593c03a92f2df9d17839056d156f125677ceb3780022aef734a4bb6c1d48d1ec3dde08875dd25fb86775aeb3908d02c41e850e95b203e0d20009d4756d33645
7
+ data.tar.gz: 707d0f050955cb8a56e8ef7803351a4fa23b9c2a6b153e6b9ed2913ef3544b4a480f7faaa4c95a55d7eb629985dd719afd11fae70ab543450ac2e5b1b64c84d0
data/README.md CHANGED
@@ -20,7 +20,7 @@ After checking out the repo, run `bin/setup` to install dependencies.
20
20
 
21
21
  Run `rake spec` to run the tests.
22
22
 
23
- Run `ruby -Ilib ./bin/renuo` to run the executable. (e.g. `ruby -Ilib ./bin/renuo -v`)
23
+ Run `bundle exec ruby -Ilib ./bin/renuo` to run the executable. (e.g. `ruby -Ilib ./bin/renuo -v`)
24
24
 
25
25
  You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
26
 
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative "../helpers/environments"
4
+
3
5
  class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLength
4
- DATABASE_SSH_KEY_FILE = "temporary_database_ssh_key"
5
6
  GITHUB_SSH_KEY_FILE_NAME = "temporary_repository_ssh_key"
6
7
  GITHUB_DEPLOY_KEY_TITLE = "deploio-deploy-key"
7
8
  SSH_ALGORITHM = "Ed25519"
9
+ PROJECT_NAME_PREFIX = "renuo-"
8
10
 
9
11
  command "create-deploio-app" do |c|
10
12
  c.syntax = "renuo create-deploio-app"
@@ -32,32 +34,84 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
32
34
  cleanup
33
35
  end
34
36
 
37
+ def git_url_valid?(git_url)
38
+ http_git_url?(git_url) || ssh_git_url?(git_url)
39
+ end
40
+
41
+ def http_git_url?(git_url)
42
+ http_git_url_regex = %r{^https?://[\w.-]+/[\w.-]+/[\w.-]+(?:\.git)?/?$}
43
+ git_url.match?(http_git_url_regex)
44
+ end
45
+
46
+ def ssh_git_url?(git_url)
47
+ ssh_git_url_regex = %r{^(git@[\w.-]+[:|/][\w.-]+/[\w.-]+\.git)$}
48
+ git_url.match?(ssh_git_url_regex)
49
+ end
50
+
35
51
  private
36
52
 
37
- def parse_arguments # rubocop:disable Metrics/MethodLength
38
- @project_name = ask("Enter the project name (e.g: my_app): ")
39
- validate_project_name!
53
+ def parse_arguments
54
+ set_project_name
55
+ set_git_url
56
+ set_postgres_version
57
+ set_vault_name
58
+ end
59
+
60
+ def set_project_name
61
+ loop do
62
+ @project_name = ask("Enter the project name (e.g: my-app): ")
63
+
64
+ break if @project_name&.length&.between?(3, 63) && @project_name.match?(/^[a-z0-9-]+$/)
65
+
66
+ say ">> Project name must be between 3 and 63 characters and can only contain lowercase letters, " \
67
+ "numbers, and hyphens. Please try again.".colorize(:red)
68
+ end
69
+
70
+ @project_display_name = @project_name
71
+ @project_name = PROJECT_NAME_PREFIX + @project_name
72
+ end
73
+
74
+ def set_git_url
75
+ loop do
76
+ @git_url = ask("Enter the git URL (e.g: git@github.com:my-org/my-app.git): ")
77
+ break if @git_url.present? && git_url_valid?(@git_url)
78
+
79
+ say ">> Git URL must be provided and valid. Please try again.".colorize(:red)
80
+ end
40
81
 
41
- @app_name = ask("Enter the app name (e.g: main): ")
42
- validate_app_name!
82
+ return unless http_git_url?(@git_url)
43
83
 
44
- @git_url = ask("Enter the git URL (e.g: git@github.com:my-org/my-app.git): ")
45
- validate_git_url
84
+ say ">> Your provided URL uses https. If the repository is private, an ssh url is required.".colorize(:yellow)
85
+ say ">> (e.g: git@github.com:my-org/my-app.git instead of https://github.com/my-org/my-app.git)".colorize(:yellow)
86
+ end
87
+
88
+ def set_postgres_version
89
+ loop do
90
+ @postgres_version = ask("Enter Postgres version (e.g., 16) or leave empty to skip database creation: ")
91
+ break if @postgres_version.empty? || @postgres_version.match?(/^\d+$/)
46
92
 
47
- @postgres_version = ask("Enter the Postgres version (major version only, e.g., 16): ")
48
- validate_postgres_version
93
+ say ">> The postgres version is invalid. Only major versions are allowed. " \
94
+ "For example, use 16 instead of 16.4. Please try again.".colorize(:red)
95
+ end
96
+ end
49
97
 
50
- @vault_name = ask("Enter the 1Password vault name (leave empty to skip): ")
51
- if @vault_name.empty?
52
- say "Skipping 1Password vault setup. Defaulting to Deploio."
53
- @vault_name = "Deploio"
54
- else
55
- validate_vault_name
98
+ def set_vault_name # rubocop:disable Metrics/MethodLength
99
+ loop do
100
+ @vault_name = ask("Enter the 1Password vault name (leave empty to skip): ")
101
+ if @vault_name.empty?
102
+ say "Skipping 1Password vault setup. Defaulting to Deploio."
103
+ @vault_name = "Deploio"
104
+ break
105
+ elsif @vault_name.present?
106
+ break
107
+ else
108
+ say ">> The vault name must be provided. Please try again.".colorize(:red)
109
+ end
56
110
  end
57
111
  end
58
112
 
59
113
  def setup_commands
60
- say "# Commands to setup your Deploio application\n".bold
114
+ say "\n# Commands to setup your Deploio applications\n".bold
61
115
  say_project_creation
62
116
  say "\n# Configure repository access\n".bold
63
117
  say_configure_repository_deploy_key
@@ -65,49 +119,24 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
65
119
 
66
120
  def setup_environments
67
121
  ENVIRONMENTS.each do |environment|
122
+ unless @postgres_version.empty?
123
+ say "\n# Commands to create #{environment} database \n".bold
124
+ say_database_creation(environment)
125
+ end
126
+
68
127
  say "\n# Commands to create #{environment} application \n".bold
69
- say_database_creation(environment)
70
- say "\n# Commands to create #{environment} database \n".bold
71
128
  say_app_creation(environment)
72
129
  end
73
130
  end
74
131
 
75
132
  def cleanup
76
- say "rm #{GITHUB_SSH_KEY_FILE_NAME}"
77
- end
78
-
79
- def validate_app_name!
80
- abort(">> App name must be provided") if @app_name.blank?
81
- end
82
-
83
- def validate_project_name!
84
- abort(">> Project name must be between 3 and 63 characters.") unless @project_name&.length&.between?(3, 63)
85
- end
86
-
87
- def validate_git_url
88
- abort(">> Git URL must be provided") unless @git_url
89
- http_git_url_regex = URI::DEFAULT_PARSER.make_regexp(%w[http https])
90
- ssh_git_url_regex = %r{^(git@[\w.-]+[:|/][\w.-]+/[\w.-]+\.git)$}
91
- valid_git_url = @git_url.match?(http_git_url_regex) || @git_url.match?(ssh_git_url_regex)
92
- abort(">> Git URL must be valid") unless valid_git_url
93
- end
94
-
95
- def validate_postgres_version
96
- return if @postgres_version.match?(/^\d+$/)
97
-
98
- abort("The postgres version is invalid. Only major versions are allowed (e.g., use 16 instead of 16.4)")
99
- end
100
-
101
- def validate_vault_name
102
- return if @vault_name.present?
103
-
104
- abort("The vault name must be provided")
133
+ say "\n# Cleanup temporary files\n".bold
134
+ say "rm #{GITHUB_SSH_KEY_FILE_NAME} #{GITHUB_SSH_KEY_FILE_NAME}.pub"
105
135
  end
106
136
 
107
137
  def say_project_creation
108
138
  say <<~OUTPUT
109
- nctl create project #{@project_name} \\
110
- --display-name='#{@app_name}'
139
+ nctl create project #{@project_name} --display-name='#{@project_display_name}'
111
140
  OUTPUT
112
141
  end
113
142
 
@@ -121,15 +150,14 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
121
150
  end
122
151
 
123
152
  def say_app_creation(environment)
124
- generate_ssh_key(DATABASE_SSH_KEY_FILE)
125
153
  say <<~OUTPUT
126
154
  nctl create app #{environment} \\
127
155
  --project #{@project_name} \\
128
156
  --git-ssh-private-key-from-file=#{GITHUB_SSH_KEY_FILE_NAME} \\
129
157
  --git-url=#{@git_url} \\
130
158
  --git-revision="#{environment}" \\
131
- --basic-auth=false \\ # Disabling Deploio basic auth as Rails app handles authentication
132
- --build-env=SECRET_KEY_BASE='rails secret' \\ # Don't forget to generate the secret key
159
+ --basic-auth=false `# Disabling Deploio basic auth as Rails app handles authentication` \\
160
+ --build-env=SECRET_KEY_BASE='rails secret' `# Do not forget to generate the secret key` \\
133
161
  --language=ruby \\
134
162
  --size=mini
135
163
  OUTPUT
@@ -137,19 +165,19 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
137
165
 
138
166
  def generate_ssh_key(file_name)
139
167
  say <<~OUTPUT
140
- ssh-keygen -t #{SSH_ALGORITHM} \\
141
- -f #{file_name} \\
142
- -N ''
143
- OUTPUT
144
-
145
- say <<~OUTPUT
168
+ # Create SSH key item in 1Password directly
146
169
  op item create \\
147
- --title #{file_name} \\
170
+ --category ssh \\
171
+ --ssh-generate-key #{SSH_ALGORITHM.downcase} \\
172
+ --title "#{@project_name}-deploy-key" \\
148
173
  --vault #{@vault_name} \\
149
- --category ssh-key \\
150
- --tags #{@project_name} \\
151
- --ssh-public-key < #{file_name}.pub \\
152
- --ssh-private-key < #{file_name}
174
+ --tags #{@project_name}
175
+
176
+ # Extract keys to temp files for deploio usage
177
+ op item get "#{@project_name}-deploy-key" --vault #{@vault_name} \\
178
+ --reveal --fields "public key" > #{file_name}.pub
179
+ op item get "#{@project_name}-deploy-key" --vault #{@vault_name} --reveal \\
180
+ --fields "private key" --format json | jq -r '.ssh_formats.openssh.value' > #{file_name}
153
181
  OUTPUT
154
182
  end
155
183
 
@@ -164,16 +192,34 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
164
192
  return
165
193
  end
166
194
 
167
- repo_name = @git_url[%r{github.com/(.*/.*)\.git}, 1]
195
+ repo_name = extract_repo_name(@git_url)
168
196
  unless repo_name
169
197
  say "# Attention: Deploy key unconfigured because repository URL is not valid".colorize(:orange)
170
198
  return
171
199
  end
172
200
 
173
201
  say <<~OUTPUT
174
- gh repo deploy-key add #{GITHUB_SSH_KEY_FILE_NAME} \\
202
+ gh repo deploy-key add #{GITHUB_SSH_KEY_FILE_NAME}.pub \\
175
203
  --repo #{repo_name} \\
176
204
  --title #{GITHUB_DEPLOY_KEY_TITLE}
177
205
  OUTPUT
178
206
  end
207
+
208
+ def extract_repo_name(git_url)
209
+ return nil unless git_url
210
+
211
+ # Handle HTTPS URLs: https://domain.com/author/repo.git
212
+ if git_url.match?(%r{^https?://})
213
+ match = git_url.match(%r{^https?://[^/]+/(.+?)(?:\.git)?/?$})
214
+ return match[1] if match
215
+ end
216
+
217
+ # Handle SSH URLs: git@domain.com:author/repo.git
218
+ if git_url.start_with?("git@")
219
+ match = git_url.match(/^git@[^:]+:(.+?)(?:\.git)?$/)
220
+ return match[1] if match
221
+ end
222
+
223
+ raise "Repository name not found in git URL: #{git_url}"
224
+ end
179
225
  end
@@ -26,7 +26,6 @@ class Renuo::Cli::Commands::CreateHerokuApp
26
26
  heroku_name = "#{project_name}-#{env}"
27
27
  say "heroku apps:create --region eu #{heroku_name} -t staff"
28
28
  say "heroku domains:add #{heroku_name}.renuoapp.ch --app #{heroku_name}"
29
- say "heroku domains:add #{project_name}-#{MASTER}.renuoapp.ch --app #{heroku_name}" if env == MAIN
30
29
  say "heroku addons:create heroku-postgresql --app #{heroku_name}"
31
30
  say "heroku labs:enable runtime-dyno-metadata --app #{heroku_name}"
32
31
  say "heroku pg:backups:schedule DATABASE_URL --at '02:00 Europe/Zurich' --app #{heroku_name}"
@@ -8,19 +8,13 @@ class Renuo::Cli::Commands::CreatePr
8
8
  "the PR body"
9
9
  c.option "--title <title>", String, "The title of the pull request (optional)"
10
10
  c.option "--redmine-ticket <number>", Integer, "The redmine ticket number (optional)"
11
- c.option "--draft", "Mark the PR as draft"
12
- c.option "--[no-]web-create", "Open web browser to create a pull request (default: true)"
13
11
  c.example "Create a PR with the title 'Implement XYZ'",
14
12
  "renuo create-pr --title 'Implement XYZ'"
15
- c.action do |_, options|
16
- options.default web_create: true
17
- new.run(options)
18
- end
13
+ c.action { |_, options| new.run(options) }
19
14
  end
20
15
 
21
16
  def run(opts)
22
17
  create_pr(opts)
23
- open_pr_in_browser unless opts.web_create
24
18
  end
25
19
 
26
20
  private
@@ -31,8 +25,7 @@ class Renuo::Cli::Commands::CreatePr
31
25
  "--assignee @me",
32
26
  pr_title(opts),
33
27
  "--body \"#{pr_body(opts)}\"",
34
- ("--web" if opts.web_create),
35
- ("--draft" if opts.draft)
28
+ "--web"
36
29
  ].compact.join(" ")
37
30
 
38
31
  puts `#{command}`
@@ -53,8 +46,4 @@ class Renuo::Cli::Commands::CreatePr
53
46
  current_branch = `git branch --show-current`.strip
54
47
  opts.redmine_ticket || current_branch.match(/(\d+)/)&.captures&.first
55
48
  end
56
-
57
- def open_pr_in_browser
58
- puts `gh pr view --web`
59
- end
60
49
  end
@@ -57,8 +57,11 @@ class Renuo::Cli::Commands::Debug
57
57
 
58
58
  if should_scan_deploio && Cache.stored_at("deploio_apps")
59
59
  select_deploio_targets(query).each do |app|
60
- exec_cmd = "nctl exec app #{app[:name]} bash --project #{app[:namespace]}"
61
- menu.choice(exec_cmd) { exec exec_cmd.squish }
60
+ bash_cmd = "nctl exec app #{app[:name]} bash --project #{app[:namespace]}"
61
+ menu.choice(bash_cmd) { exec bash_cmd.squish }
62
+
63
+ rails_console_cmd = "nctl exec app #{app[:name]} bundle exec rails console --project #{app[:namespace]}"
64
+ menu.choice(rails_console_cmd) { exec rails_console_cmd.squish }
62
65
 
63
66
  log_cmd = "nctl logs app #{app[:name]} -f --project #{app[:namespace]}"
64
67
  menu.choice(log_cmd) { exec log_cmd.squish }
@@ -74,7 +77,10 @@ class Renuo::Cli::Commands::Debug
74
77
  exec_cmd = "heroku run bash --app #{app[:name]}"
75
78
  menu.choice(exec_cmd) { exec exec_cmd.squish }
76
79
 
77
- log_cmd = "heroku logs -t --app #{app[:name]}"
80
+ rails_console_cmd = "heroku run bundle exec rails console --app #{app[:name]}"
81
+ menu.choice(rails_console_cmd) { exec rails_console_cmd.squish }
82
+
83
+ log_cmd = "heroku logs -t --app #{app[:name]}"
78
84
  menu.choice(log_cmd) { exec log_cmd.squish }
79
85
 
80
86
  app[:domains].each do |host|
@@ -91,7 +91,7 @@ class Renuo::Cli::Commands::FetchSecrets # rubocop:disable Metrics/ClassLength
91
91
  warn "Field `#{name}` not found in item #{item_id}. Check the field name in your #{CONFIG_FILE} file."
92
92
  else
93
93
  value = env_json["value"]
94
- update_or_add_variable(".env", name, /^#{name}=/, "#{name}=#{value}")
94
+ update_or_add_variable(".env", name, /^#{name}=.*$/, "#{name}=#{value}")
95
95
  update_or_add_variable("config/application.yml", name, /^#{name}:.*$/, "#{name}: \"#{value}\"")
96
96
  end
97
97
  end
@@ -102,21 +102,21 @@ class Renuo::Cli::Commands::Release # rubocop:disable Metrics/ClassLength
102
102
  @current_version ||= if `#{cmd_in_folder("git tag")}` == ""
103
103
  "0.0.0"
104
104
  else
105
- sorted_tags = `#{cmd_in_folder("git tag --sort=taggerdate")}`.split("\n").reverse
105
+ sorted_tags = `#{cmd_in_folder("git tag --sort=v:refname")}`.split("\n").reverse
106
106
  sorted_tags.find { |tag| tag =~ RenuoVersion::SEMVER_SCHEMA }.strip
107
107
  end
108
108
  end
109
109
 
110
110
  def bump_version
111
- version_bumped = find_and_replace_version
111
+ changed_files = find_and_replace_version
112
112
 
113
- return unless version_bumped
113
+ return unless changed_files.any?
114
114
 
115
- system(cmd_in_folder(%(git add #{find_files_with_version.join(" ")} && git commit -m "Bump version")))
115
+ system(cmd_in_folder(%(git add #{changed_files.join(" ")} && git commit -m "Bump version")))
116
116
  end
117
117
 
118
118
  def find_and_replace_version
119
- find_files_with_version.any? do |file_name|
119
+ find_files_with_version.filter do |file_name|
120
120
  puts "Replace the version in #{file_name}?"
121
121
  print_version_found(file_name)
122
122
  if agree("confirm?")
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Renuo::Cli::Commands::UpgradeLaptop
4
+ include CommandHelper
5
+
4
6
  command "upgrade-laptop" do |c|
5
7
  c.syntax = "renuo upgrade-laptop"
6
8
  c.summary = "Upgrades the installed apps from the app store, macOS and homebrew"
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  MAIN = "main"
4
- MASTER = "master"
5
4
  DEVELOP = "develop"
6
5
  ENVIRONMENTS = [MAIN, DEVELOP].freeze
@@ -17,7 +17,7 @@ class Renuo::Cli::Services::Heroku
17
17
  end
18
18
 
19
19
  def fetch_app_names(team = nil)
20
- fetch_app_names_cmd = %(heroku apps --json #{team ? "--team=#{team}" : ""} | jq -r '.[] | "\\(.name)"')
20
+ fetch_app_names_cmd = %(heroku apps --json #{"--team=#{team}" if team} | jq -r '.[] | "\\(.name)"')
21
21
  stdout, stderr, status = Open3.capture3 fetch_app_names_cmd
22
22
  raise "Error fetching Heroku app list: #{stderr}" unless status.success?
23
23
 
@@ -16,11 +16,8 @@ do
16
16
  ;;
17
17
 
18
18
  assets)
19
- cache restore "packs-$SEMAPHORE_GIT_BRANCH,packs-develop"
20
- cache restore "packstest-$SEMAPHORE_GIT_BRANCH,packstest-develop"
21
19
  cache restore "assets-$SEMAPHORE_GIT_BRANCH,assets-develop"
22
20
  cache restore "sprocketscache-$SEMAPHORE_GIT_BRANCH,sprocketscache-develop"
23
- cache restore "webpackercache-$SEMAPHORE_GIT_BRANCH,webpackercache-develop"
24
21
  ;;
25
22
 
26
23
  *)
@@ -16,11 +16,8 @@ do
16
16
  ;;
17
17
 
18
18
  assets)
19
- cache store packs-$SEMAPHORE_GIT_BRANCH public/packs
20
- cache store packstest-$SEMAPHORE_GIT_BRANCH public/packs-test
21
19
  cache store assets-$SEMAPHORE_GIT_BRANCH public/assets
22
20
  cache store sprocketscache-$SEMAPHORE_GIT_BRANCH tmp/cache/assets/sprockets
23
- cache store webpackercache-$SEMAPHORE_GIT_BRANCH tmp/cache/webpacker
24
21
  ;;
25
22
 
26
23
  *)
@@ -2,14 +2,17 @@ version: v1.0
2
2
  name: <%= environment %>-deploy
3
3
  agent:
4
4
  machine:
5
- type: e2-standard-2
5
+ type: f1-standard-4
6
6
  os_image: ubuntu2204
7
7
 
8
8
  blocks:
9
9
  - name: <%= environment %>-deploy
10
+ execution_time_limit:
11
+ minutes: 10
10
12
  task:
11
13
  secrets:
12
14
  - name: <%= project_name %>
15
+ - name: nctl
13
16
  env_vars:
14
17
  - name: DEPLOIO_PROJECT
15
18
  value: renuo-<%= project_name %>
@@ -22,7 +25,7 @@ blocks:
22
25
  - echo 'deb [trusted=yes] https://repo.nine.ch/deb/ /' | sudo tee /etc/apt/sources.list.d/repo.nine.ch.list
23
26
  - sudo apt-get -qq update
24
27
  - sudo apt-get -qq install -y nctl
25
- - nctl auth login --api-token=$API_TOKEN --organization=renuo
28
+ - nctl auth login --api-client-id=$NCTL_API_CLIENT_ID --api-client-secret=$NCTL_API_CLIENT_SECRET --organization=$NCTL_ORGANIZATION
26
29
  - nctl update app $DEPLOIO_APP_NAME -p $DEPLOIO_PROJECT --build-env="RUBY_VERSION=$(cat .ruby-version)" --git-revision=$(git rev-parse HEAD) --skip-repo-access-check
27
30
  - gem i renuo-cli
28
31
  - renuo check-deploio-status
@@ -3,7 +3,7 @@ name: <%= project_name %>
3
3
 
4
4
  agent:
5
5
  machine:
6
- type: e2-standard-2
6
+ type: f1-standard-4
7
7
  os_image: ubuntu2204
8
8
 
9
9
  auto_cancel:
@@ -24,21 +24,11 @@ global_job_config:
24
24
  - source .semaphore/bin/cache_restore rails
25
25
  - bundle config set deployment 'true'
26
26
  - bundle config set path 'vendor/bundle'
27
- - bundle install -j 4
27
+ - bundle install
28
28
 
29
29
  blocks:
30
- - name: cache
31
- dependencies: []
32
- execution_time_limit:
33
- minutes: 10
34
- task:
35
- jobs:
36
- - name: cache
37
- commands:
38
- - source .semaphore/bin/cache_store rails
39
-
40
30
  - name: linting
41
- dependencies: [cache]
31
+ dependencies: []
42
32
  execution_time_limit:
43
33
  minutes: 5
44
34
  task:
@@ -48,7 +38,7 @@ blocks:
48
38
  - bin/fastcheck
49
39
 
50
40
  - name: tests
51
- dependencies: [cache]
41
+ dependencies: []
52
42
  execution_time_limit:
53
43
  minutes: 10
54
44
  task:
@@ -59,16 +49,17 @@ blocks:
59
49
  value: test
60
50
  prologue:
61
51
  commands:
62
- - sem-service start postgres
63
- - cp config/application.example.yml config/application.yml
52
+ - sem-service start postgres 16
53
+ - cp .env.example .env
64
54
  - bundle exec rails db:create db:schema:load
65
55
  jobs:
66
56
  - name: tests
67
57
  commands:
68
58
  - bin/check
69
59
  epilogue:
70
- on_fail:
60
+ always:
71
61
  commands:
62
+ - source .semaphore/bin/cache_store rails
72
63
  - mkdir -p log coverage tmp/screenshots tmp/capybara
73
64
  - artifact push job log
74
65
  - artifact push job tmp/screenshots
@@ -3,7 +3,7 @@
3
3
  # :nocov:
4
4
  module Renuo
5
5
  class Cli
6
- VERSION = "4.13.1"
6
+ VERSION = "4.15.0"
7
7
  NAME = "renuo-cli"
8
8
  end
9
9
  end
data/lib/renuo/cli.rb CHANGED
@@ -36,9 +36,11 @@ module Renuo
36
36
 
37
37
  program :version, Renuo::Cli::VERSION
38
38
  program :description, "Renuo CLI"
39
+ program :help_paging, false
39
40
  update
40
41
 
41
42
  Dir[File.expand_path("cli/{commands,services}/*.rb", __dir__)].each { |f| require f }
43
+ default_command :help
42
44
  end
43
45
 
44
46
  private
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renuo-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.13.1
4
+ version: 4.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renuo AG
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.6.2
138
+ rubygems_version: 3.6.9
139
139
  specification_version: 4
140
140
  summary: The Renuo CLI automates some common workflows.
141
141
  test_files: []