minfra-cli 1.13.0 → 1.13.2

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: 013e2aad3df9fffb13eaceeac4ccc3306ac4dfedb9ef7f0019251ee4238e9dbf
4
- data.tar.gz: 266a3cbfbcbc27eda6411806a20c1f3d5547d4b02fda404531861eb538f1be2b
3
+ metadata.gz: 3a51109711adec2427362f6dd5b9721cbb86f7e9ee740a83155b93d2919a3f28
4
+ data.tar.gz: 1772e50a23ac6503f793c7569faf3d412101f8b171e99abe80e6aca35f983c39
5
5
  SHA512:
6
- metadata.gz: ab2a2990bec284c339aaee8b49998cbf93c5cc53179a70ac6ddc6c6d557eb30b3b5b594877d744875bbeb200b90533630e61d60a84b016dab044e128b74aa6b0
7
- data.tar.gz: b2e7767759e9c2eb7391974a46d1c1bec649f5247f580a7f7aef3b3bbc98e451d1ef882bdae0fc52fbfa12ad2d572a3d8daefb0a7a05f774909bf1aab1e2f129
6
+ metadata.gz: 4bd36e1f60ff64a284236a9d41bd125461b1b583eab989836138277d24963a099e49bc8dd715f912089ea1ac8516dee2dbe019f8642382628be0af276a039be7
7
+ data.tar.gz: a9f36abba93f8a7ef2fc865f50f116f38a7db7daceeae1ac5a2ec46e275ee1afe5859a4f3aa512158a21c5b6b16de9882ad7b4db01a4d2f895cca570d2d86e1b
@@ -0,0 +1,38 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ $default-branch ]
13
+ pull_request:
14
+ branches: [ $default-branch ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['2.6', '2.7', '3.0']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
32
+ # uses: ruby/setup-ruby@v1
33
+ uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
34
+ with:
35
+ ruby-version: ${{ matrix.ruby-version }}
36
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37
+ - name: Run tests
38
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.13.2
2
+ * BUG: fixing generic secret
3
+ # 1.13.1
4
+ * BUG: not every deployer contexts have cleanups
1
5
  # 1.13.0
2
6
  * secrets can be rendered with apply (currently hardcoded)
3
7
  * moved most output to debug level
@@ -1,5 +1,5 @@
1
1
  module Minfra
2
2
  module Cli
3
- VERSION = '1.13.0'.freeze
3
+ VERSION = '1.13.2'.freeze
4
4
  end
5
5
  end
@@ -52,7 +52,7 @@ module Orchparty
52
52
  @out_io.puts upgrade_cmd(value_path).cmd
53
53
  @out_io.puts '---'
54
54
  @out_io.puts File.read(template(value_path, service, flag: '')) if value_path
55
- cleanup
55
+ cleanup if respond_to?(:cleanup)
56
56
  end
57
57
 
58
58
  # On 05.02.2021 we have decided that it would be best to print both commands.
@@ -116,16 +116,25 @@ module Orchparty
116
116
  end
117
117
 
118
118
  def upgrade_cmd(fix_file_path = nil)
119
- "kubectl --namespace #{namespace} --context #{cluster_name} create secret generic --dry-run -o yaml #{service[:name]} #{template(
120
- value_path, service, flag: '--from-file=', fix_file_path: fix_file_path
121
- )} | kubectl --context #{cluster_name} apply -f -"
119
+ install_cmd(fix_file_path)
122
120
  end
123
121
 
124
122
  def install_cmd(fix_file_path = nil)
125
- "kubectl --namespace #{namespace} --context #{cluster_name} create secret generic --dry-run -o yaml #{service[:name]} #{template(
126
- value_path, service, flag: '--from-file=', fix_file_path: fix_file_path
127
- )} | kubectl --context #{cluster_name} apply -f -"
123
+ cmd="kubectl --namespace #{namespace} create secret generic --dry-run=client -o yaml #{service[:name]} #{template(value_path, service, flag: '--from-file=')} > #{tempfile.path}"
124
+ res = system(cmd)
125
+ Minfra::Cli::KubeCtlRunner.new("apply --context #{cluster_name} -f #{tempfile.path}")
126
+ end
127
+
128
+ def cleanup
129
+ tempfile.unlink
130
+ end
131
+
132
+ private
133
+
134
+ def tempfile
135
+ @tempfile ||= Tempfile.new('secret_generic')
128
136
  end
137
+
129
138
  end
130
139
 
131
140
  class Label < Context
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minfra-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Schrammel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-10 00:00:00.000000000 Z
11
+ date: 2023-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -151,6 +151,7 @@ extensions: []
151
151
  extra_rdoc_files: []
152
152
  files:
153
153
  - ".dockerignore"
154
+ - ".github/workflows/ruby.yml"
154
155
  - ".gitignore"
155
156
  - CHANGELOG.md
156
157
  - Dockerfile