seira 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/trunk.yml +21 -0
- data/.trunk/.gitignore +8 -0
- data/.trunk/configs/.markdownlint.yaml +10 -0
- data/.trunk/configs/.shellcheckrc +7 -0
- data/.trunk/configs/.yamllint.yaml +10 -0
- data/.trunk/trunk.yaml +34 -0
- data/lib/seira/version.rb +1 -1
- data/lib/seira.rb +11 -2
- metadata +8 -4
- data/.default-rubocop.yml +0 -1769
- data/.rubocop.yml +0 -112
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e10cda9c969f7e1401f200a538d380f397c1061f4040bef400961a9b74b28b93
|
4
|
+
data.tar.gz: 66f4790fa1d7fb8b5ea58d7bb798206cb375d2329b12a029714003f45633e9af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0534e0ab281bdd9667f8bae85a72464dadc042d3bed0a79f784251df7a3e15b2fd76809efd19fd1edcee5b78697ff8392245a347a98ee2bd451c6d7d19a341d
|
7
|
+
data.tar.gz: e85b638eeef614999f8c67dc40933f43ce61e2180fe020fb81cc22e79c67a1a2de6b57c1904062c57fb80c3c7c57264c129d1d75a333876b423fab629d355a81
|
@@ -0,0 +1,21 @@
|
|
1
|
+
name: Trunk Check
|
2
|
+
on: [pull_request]
|
3
|
+
concurrency:
|
4
|
+
group: ${{ github.head_ref || github.run_id }}
|
5
|
+
cancel-in-progress: true
|
6
|
+
|
7
|
+
permissions: read-all
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
trunk_check:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
permissions:
|
13
|
+
checks: write # For trunk to post annotations
|
14
|
+
contents: read # For repo checkout
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- name: Checkout
|
18
|
+
uses: actions/checkout@v3
|
19
|
+
|
20
|
+
- name: Trunk Check
|
21
|
+
uses: trunk-io/trunk-action@v1.1.7
|
data/.trunk/.gitignore
ADDED
data/.trunk/trunk.yaml
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
version: 0.1
|
2
|
+
cli:
|
3
|
+
version: 1.14.1
|
4
|
+
plugins:
|
5
|
+
sources:
|
6
|
+
- id: trunk
|
7
|
+
ref: v1.2.1
|
8
|
+
uri: https://github.com/trunk-io/plugins
|
9
|
+
runtimes:
|
10
|
+
enabled:
|
11
|
+
- go@1.19.5
|
12
|
+
- node@18.12.1
|
13
|
+
- python@3.10.8
|
14
|
+
- ruby@3.1.4
|
15
|
+
lint:
|
16
|
+
enabled:
|
17
|
+
- actionlint@1.6.25
|
18
|
+
- checkov@2.4.6
|
19
|
+
- git-diff-check
|
20
|
+
- markdownlint@0.35.0
|
21
|
+
- prettier@3.0.2
|
22
|
+
- shellcheck@0.9.0
|
23
|
+
- shfmt@3.6.0
|
24
|
+
- trivy@0.44.1
|
25
|
+
- trufflehog@3.48.0
|
26
|
+
- yamllint@1.32.0
|
27
|
+
disabled:
|
28
|
+
- rubocop@1.39.0
|
29
|
+
actions:
|
30
|
+
enabled:
|
31
|
+
- trunk-announce
|
32
|
+
- trunk-check-pre-push
|
33
|
+
- trunk-fmt-pre-commit
|
34
|
+
- trunk-upgrade-available
|
data/lib/seira/version.rb
CHANGED
data/lib/seira.rb
CHANGED
@@ -127,7 +127,14 @@ module Seira
|
|
127
127
|
status = Seira::Teleport::Status.new
|
128
128
|
|
129
129
|
unless required_roles.empty? || required_roles.any? { |r| status.has_role?(r) }
|
130
|
-
|
130
|
+
reviewer = ENV['TELEPORT_REVIEWER']
|
131
|
+
args.each do |arg|
|
132
|
+
if arg.start_with? '--reviewer='
|
133
|
+
reviewer = arg.split('=')[1]
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
Seira::Teleport::Request.new(required_roles, reviewer: reviewer, context: passed_context).invoke
|
131
138
|
end
|
132
139
|
end
|
133
140
|
|
@@ -180,7 +187,9 @@ module Seira
|
|
180
187
|
|
181
188
|
# The first arg must always be the cluster. This ensures commands are not run by
|
182
189
|
# accident on the wrong kubernetes cluster or gcloud project.
|
183
|
-
exit(1) unless Seira::Cluster.new(action: nil, args: nil, context: nil, settings: settings).switch(
|
190
|
+
exit(1) unless Seira::Cluster.new(action: nil, args: nil, context: nil, settings: settings).switch(
|
191
|
+
target_cluster: cluster, verbose: false
|
192
|
+
)
|
184
193
|
exit(0) if simple_cluster_change?
|
185
194
|
end
|
186
195
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Ringwelski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|
@@ -102,13 +102,17 @@ executables:
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
-
- ".default-rubocop.yml"
|
106
105
|
- ".github/workflows/ruby.yml"
|
106
|
+
- ".github/workflows/trunk.yml"
|
107
107
|
- ".gitignore"
|
108
108
|
- ".hound.yml"
|
109
109
|
- ".rspec"
|
110
|
-
- ".rubocop.yml"
|
111
110
|
- ".ruby-version"
|
111
|
+
- ".trunk/.gitignore"
|
112
|
+
- ".trunk/configs/.markdownlint.yaml"
|
113
|
+
- ".trunk/configs/.shellcheckrc"
|
114
|
+
- ".trunk/configs/.yamllint.yaml"
|
115
|
+
- ".trunk/trunk.yaml"
|
112
116
|
- Gemfile
|
113
117
|
- LICENSE
|
114
118
|
- README.md
|