renuo-cli 4.14.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: 8d640a2a344a4f7297eaa13bef43760785530de9f46deef2a4016665b5ced8e8
4
- data.tar.gz: 1fc8e948cf5c4ef86c6be83f001338cef37a84da78088c7929d162d7e891c6e9
3
+ metadata.gz: 803278ba1e1fc8859287b68a32e3c3545afbaea2423f1a6eb3a8d5754d777f65
4
+ data.tar.gz: fb96573c7ae9899aa951ec5af5a11d2e6f8be58f753af48243095a7bb6e6f75d
5
5
  SHA512:
6
- metadata.gz: 7a11af0c25dd6c23eecda8f9e588ff9a599714c5e9b8b9ef9d41c3488d28a71ab834c1789cddb4aa81a73eefb72f3ce98d028b263c81fe6dd2f108f58ea3c7af
7
- data.tar.gz: 5c323269241ed04e97243bf8009aa527fa508491e5a62169d4c77303496a17c1ced584537ab7cea02666d082b8b720730237ea47d7abb967b4a50a447c093ec7
6
+ metadata.gz: d593c03a92f2df9d17839056d156f125677ceb3780022aef734a4bb6c1d48d1ec3dde08875dd25fb86775aeb3908d02c41e850e95b203e0d20009d4756d33645
7
+ data.tar.gz: 707d0f050955cb8a56e8ef7803351a4fa23b9c2a6b153e6b9ed2913ef3544b4a480f7faaa4c95a55d7eb629985dd719afd11fae70ab543450ac2e5b1b64c84d0
@@ -35,9 +35,17 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
35
35
  end
36
36
 
37
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)
38
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)
39
47
  ssh_git_url_regex = %r{^(git@[\w.-]+[:|/][\w.-]+/[\w.-]+\.git)$}
40
- git_url.match?(http_git_url_regex) || git_url.match?(ssh_git_url_regex)
48
+ git_url.match?(ssh_git_url_regex)
41
49
  end
42
50
 
43
51
  private
@@ -70,6 +78,11 @@ class Renuo::Cli::Commands::CreateDeploioApp # rubocop:disable Metrics/ClassLeng
70
78
 
71
79
  say ">> Git URL must be provided and valid. Please try again.".colorize(:red)
72
80
  end
81
+
82
+ return unless http_git_url?(@git_url)
83
+
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)
73
86
  end
74
87
 
75
88
  def set_postgres_version
@@ -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
@@ -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,7 +2,7 @@ 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:
@@ -12,6 +12,7 @@ blocks:
12
12
  task:
13
13
  secrets:
14
14
  - name: <%= project_name %>
15
+ - name: nctl
15
16
  env_vars:
16
17
  - name: DEPLOIO_PROJECT
17
18
  value: renuo-<%= project_name %>
@@ -24,7 +25,7 @@ blocks:
24
25
  - echo 'deb [trusted=yes] https://repo.nine.ch/deb/ /' | sudo tee /etc/apt/sources.list.d/repo.nine.ch.list
25
26
  - sudo apt-get -qq update
26
27
  - sudo apt-get -qq install -y nctl
27
- - 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
28
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
29
30
  - gem i renuo-cli
30
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:
@@ -3,7 +3,7 @@
3
3
  # :nocov:
4
4
  module Renuo
5
5
  class Cli
6
- VERSION = "4.14.1"
6
+ VERSION = "4.15.0"
7
7
  NAME = "renuo-cli"
8
8
  end
9
9
  end
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.14.1
4
+ version: 4.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renuo AG
@@ -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.7.0
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: []