minfra-cli 1.13.1 → 1.13.3
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/.github/workflows/ruby.yml +38 -0
- data/CHANGELOG.md +4 -0
- data/lib/minfra/cli/version.rb +1 -1
- data/lib/orchparty/kubernetes_application.rb +17 -8
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbedced0f2e6a1c68ae0cce34908a34e3d8b5a9cbdf7aa2d083b4ece6216d4a6
|
4
|
+
data.tar.gz: e4ba9f69335fc8292f701d258e2f958746979ece4c9b40a0092ba6d58f5518c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/minfra/cli/version.rb
CHANGED
@@ -116,16 +116,25 @@ module Orchparty
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def upgrade_cmd(fix_file_path = nil)
|
119
|
-
|
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}
|
126
|
-
|
127
|
-
|
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
|
-
|
152
|
+
install_cmd
|
144
153
|
end
|
145
154
|
|
146
155
|
def install_cmd
|
147
|
-
"
|
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.
|
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-
|
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
|