mina-infinum 2.3.0 → 2.4.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/CHANGELOG.md +8 -0
- data/lib/mina/infinum/ecs/README.md +4 -0
- data/lib/mina/infinum/ecs/aws.rb +6 -0
- data/lib/mina/infinum/ecs/db.rb +1 -2
- data/lib/mina/infinum/ecs/ecs.rb +2 -2
- data/lib/mina/infinum/ecs/logs.rb +2 -2
- data/lib/mina/infinum/ecs/params.rb +9 -3
- data/lib/mina/infinum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d08049d5114d7747bbad76c04cec40f51f95b55b1741b79fc57fc3fa96d7419
|
4
|
+
data.tar.gz: 25e29db32a826f58bb8fc530f8ae9fea7fbd159a0f8880dab2b02c9003365978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b0043ceea5b17160fc4b164fad29948cb4e910d479b8e591935cf2be740545f92af8ebf1c4a94ed209fb7a92c4b830f8632b6f7bc0422397800f2cb839ec00
|
7
|
+
data.tar.gz: 488b575896cbb2d8be5efac54f71cb6bf5a639492b877bca0ca92d974f78e23d7d0001bdd9b4e838f19a06ec13ff495b1f24accd2e0e1369d22c08ba44722201
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v2.4.0](https://github.com/infinum/mina-infinum/tree/v-2.4.0) (2025-10-14)
|
4
|
+
[Full Changelog](https://github.com/infinum/mina-infinum/compare/v2.3.0...v2.4.0)
|
5
|
+
|
6
|
+
### Enhancements
|
7
|
+
|
8
|
+
- Add `skip_profile` flag to call AWS CLI commands without a `--profile` flag [\#9](https://github.com/infinum/mina-infinum/pull/9)
|
9
|
+
- Add path param to params:pull task [\#10](https://github.com/infinum/mina-infinum/pull/10)
|
10
|
+
|
3
11
|
## [v2.3.0](https://github.com/infinum/mina-infinum/tree/v-2.3.0) (2025-10-02)
|
4
12
|
[Full Changelog](https://github.com/infinum/mina-infinum/compare/v2.2.0...v2.3.0)
|
5
13
|
|
@@ -70,3 +70,7 @@ Starting session with SessionId: botocore-session-12345
|
|
70
70
|
Port 9999 opened for sessionId botocore-session-12345.
|
71
71
|
Waiting for connections...
|
72
72
|
```
|
73
|
+
|
74
|
+
## Skip profile
|
75
|
+
|
76
|
+
To execute AWS CLI commands without the `--profile` flag, append `skip_profile=true` to your commands, e.g.: `bundle exec mina staging params:pull skip_profile=true`.
|
data/lib/mina/infinum/ecs/aws.rb
CHANGED
@@ -43,6 +43,8 @@ namespace :aws do
|
|
43
43
|
|
44
44
|
namespace :profile do
|
45
45
|
task :check do
|
46
|
+
next if fetch(:skip_profile)
|
47
|
+
|
46
48
|
ensure!(:aws_profile)
|
47
49
|
|
48
50
|
unless profile_exists?(fetch(:aws_profile))
|
@@ -92,5 +94,9 @@ def profile_exists?(profile)
|
|
92
94
|
profiles.split("\n").include?(profile)
|
93
95
|
end
|
94
96
|
|
97
|
+
def aws_cli_profile_flag
|
98
|
+
fetch(:aws_profile) && !fetch(:skip_profile) ? "--profile #{fetch(:aws_profile)}" : ''
|
99
|
+
end
|
100
|
+
|
95
101
|
desc 'Alias for aws:login'
|
96
102
|
task :login => 'aws:login'
|
data/lib/mina/infinum/ecs/db.rb
CHANGED
@@ -15,7 +15,6 @@ namespace :db do
|
|
15
15
|
ensure!(:aws_jump_server_id)
|
16
16
|
ensure!(:db_host)
|
17
17
|
|
18
|
-
profile = fetch(:aws_profile)
|
19
18
|
jump_server_id = fetch(:aws_jump_server_id)
|
20
19
|
host = fetch(:db_host)
|
21
20
|
remote_port = fetch(:db_port, 5432)
|
@@ -26,7 +25,7 @@ namespace :db do
|
|
26
25
|
--target #{jump_server_id}
|
27
26
|
--document-name AWS-StartPortForwardingSessionToRemoteHost
|
28
27
|
--parameters host="#{host}",portNumber="#{remote_port}",localPortNumber="#{local_port}"
|
29
|
-
|
28
|
+
#{aws_cli_profile_flag}
|
30
29
|
#{'--debug' if debug?}
|
31
30
|
CMD
|
32
31
|
end
|
data/lib/mina/infinum/ecs/ecs.rb
CHANGED
@@ -24,7 +24,7 @@ namespace :ecs do
|
|
24
24
|
--task #{task_arn}
|
25
25
|
--command \"#{command}\"
|
26
26
|
--cluster #{fetch(:cluster)}
|
27
|
-
|
27
|
+
#{aws_cli_profile_flag}
|
28
28
|
--interactive
|
29
29
|
#{'--debug' if debug?}
|
30
30
|
CMD
|
@@ -48,7 +48,7 @@ def find_task_arn
|
|
48
48
|
--output json
|
49
49
|
--cluster #{fetch(:cluster)}
|
50
50
|
--service #{fetch(:service)}
|
51
|
-
|
51
|
+
#{aws_cli_profile_flag}
|
52
52
|
#{'--debug' if debug?}
|
53
53
|
CMD
|
54
54
|
|
@@ -39,7 +39,7 @@ task logs: ['aws:profile:check'] do
|
|
39
39
|
raw_logs = run_cmd squish(<<~CMD)
|
40
40
|
aws logs filter-log-events
|
41
41
|
--log-group-name #{fetch(:log_group)}
|
42
|
-
|
42
|
+
#{aws_cli_profile_flag}
|
43
43
|
--start-time #{since_time.strftime('%s%L')}
|
44
44
|
--end-time #{until_time.strftime('%s%L')}
|
45
45
|
--output json
|
@@ -99,7 +99,7 @@ namespace :logs do
|
|
99
99
|
puts "Tailing logs from #{fetch(:log_group)}"
|
100
100
|
run_cmd squish(<<~CMD), exec: true
|
101
101
|
aws logs tail #{fetch(:log_group)}
|
102
|
-
|
102
|
+
#{aws_cli_profile_flag}
|
103
103
|
--follow
|
104
104
|
--format short
|
105
105
|
#{"--since #{since_time}" if since_time}
|
@@ -15,13 +15,19 @@ namespace :params do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
desc <<~TXT
|
18
|
-
Save AWS Param Store params to
|
18
|
+
Save AWS Param Store params to a file
|
19
|
+
|
20
|
+
Params are by default stored to .env file, you can override
|
21
|
+
the location with :path. For example:
|
22
|
+
$ mina params:pull path=.env.local
|
19
23
|
|
20
24
|
See params:read documentation for details on how params
|
21
25
|
are fetched.
|
22
26
|
TXT
|
23
27
|
task pull: ['aws:profile:check'] do
|
24
|
-
|
28
|
+
path = fetch(:path) || '.env'
|
29
|
+
|
30
|
+
env_file_path = File.join(Dir.pwd, path)
|
25
31
|
|
26
32
|
File.write(env_file_path, get_params.map(&:as_env).join("\n"))
|
27
33
|
end
|
@@ -55,7 +61,7 @@ def get_params_from_aws
|
|
55
61
|
--path #{params_path}
|
56
62
|
--with-decryption
|
57
63
|
--recursive
|
58
|
-
|
64
|
+
#{aws_cli_profile_flag}
|
59
65
|
#{'--debug' if debug?}
|
60
66
|
CMD
|
61
67
|
|
data/lib/mina/infinum/version.rb
CHANGED