minfra-cli 1.13.1 → 1.13.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13ee4d15bbbb5847263526a32b76a010546c2f4ef34699c4dee6411f593ec6ac
4
- data.tar.gz: 9396bde3f3ce5d96a2a38299a4dd74c6284bf040da3f69bf565663ceb77f9715
3
+ metadata.gz: bbedced0f2e6a1c68ae0cce34908a34e3d8b5a9cbdf7aa2d083b4ece6216d4a6
4
+ data.tar.gz: e4ba9f69335fc8292f701d258e2f958746979ece4c9b40a0092ba6d58f5518c7
5
5
  SHA512:
6
- metadata.gz: e3b2eabee4c39d00457e708ddcaddd843305a85cb57bc2e6371354c477e7ea2ceaa2c34ecd2609a452a76f244bfddeaa93fc8f72ff2118618af488728f727c22
7
- data.tar.gz: 9e1094aadc780ddd94de465b11ab988d3698937b455cae86a9dc42b4100984e2f358b29aac1f489524d6de297019ff44e14fc374a2ee4586276edbca414f3d25
6
+ metadata.gz: 0b96daa8347897a59df15922108a1f148fea5ab5cf6549781c4647f381bad36c78bcf5d3836dbc8e6bda1832c453f7bf7a0640f308245574aae29a43bd7e6380
7
+ data.tar.gz: 0f599e97da1714cb30acff69e689762440560d3f6e8f8c3a876dfdddfe754ce29875516a558750f942d48248554572b9557c62ea909958fa096c3d1f31f92329
@@ -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.3
2
+ * BUG: fixing 'labelÄ
3
+ # 1.13.2
4
+ * BUG: fixing 'generic_secret'
1
5
  # 1.13.1
2
6
  * BUG: not every deployer contexts have cleanups
3
7
  # 1.13.0
@@ -1,5 +1,5 @@
1
1
  module Minfra
2
2
  module Cli
3
- VERSION = '1.13.1'.freeze
3
+ VERSION = '1.13.3'.freeze
4
4
  end
5
5
  end
@@ -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}")
128
126
  end
127
+
128
+ def cleanup
129
+ tempfile.unlink
130
+ end
131
+
132
+ private
133
+
134
+ def tempfile
135
+ @tempfile ||= Tempfile.new('secret_generic')
136
+ end
137
+
129
138
  end
130
139
 
131
140
  class Label < Context
@@ -140,11 +149,11 @@ module Orchparty
140
149
  end
141
150
 
142
151
  def upgrade_cmd
143
- "kubectl --namespace #{namespace} --context #{cluster_name} label --overwrite #{service[:resource]} #{service[:name]} #{service['value']}"
152
+ install_cmd
144
153
  end
145
154
 
146
155
  def install_cmd
147
- "kubectl --namespace #{namespace} --context #{cluster_name} label --overwrite #{service[:resource]} #{service[:name]} #{service['value']}"
156
+ Minfra::Cli::KubeCtlRunner.new("label --namespace #{namespace} --context #{cluster_name} --overwrite #{service[:resource]} #{service[:name]} #{service['value']}")
148
157
  end
149
158
  end
150
159
 
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.1
4
+ version: 1.13.3
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-15 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