minfra-cli 1.13.1 → 1.13.2

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: 3a51109711adec2427362f6dd5b9721cbb86f7e9ee740a83155b93d2919a3f28
4
+ data.tar.gz: 1772e50a23ac6503f793c7569faf3d412101f8b171e99abe80e6aca35f983c39
5
5
  SHA512:
6
- metadata.gz: e3b2eabee4c39d00457e708ddcaddd843305a85cb57bc2e6371354c477e7ea2ceaa2c34ecd2609a452a76f244bfddeaa93fc8f72ff2118618af488728f727c22
7
- data.tar.gz: 9e1094aadc780ddd94de465b11ab988d3698937b455cae86a9dc42b4100984e2f358b29aac1f489524d6de297019ff44e14fc374a2ee4586276edbca414f3d25
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,5 @@
1
+ # 1.13.2
2
+ * BUG: fixing generic secret
1
3
  # 1.13.1
2
4
  * BUG: not every deployer contexts have cleanups
3
5
  # 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.2'.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
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.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-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