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 +4 -4
- data/lib/renuo/cli/commands/create_deploio_app.rb +14 -1
- data/lib/renuo/cli/commands/fetch_secrets.rb +1 -1
- data/lib/renuo/cli/services/heroku.rb +1 -1
- data/lib/renuo/cli/templates/semaphore/bin/cache_restore.erb +0 -3
- data/lib/renuo/cli/templates/semaphore/bin/cache_store.erb +0 -3
- data/lib/renuo/cli/templates/semaphore/semaphore-deploy.yml.erb +3 -2
- data/lib/renuo/cli/templates/semaphore/semaphore.yml.erb +1 -1
- data/lib/renuo/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 803278ba1e1fc8859287b68a32e3c3545afbaea2423f1a6eb3a8d5754d777f65
|
|
4
|
+
data.tar.gz: fb96573c7ae9899aa951ec5af5a11d2e6f8be58f753af48243095a7bb6e6f75d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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?(
|
|
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}
|
|
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 #{
|
|
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:
|
|
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-
|
|
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
|
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.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.
|
|
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: []
|