rake_vault 0.5.0.pre.2 → 0.5.0.pre.2.pr119.1.1
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/Gemfile.lock +84 -75
- data/README.md +4 -4
- data/Rakefile +114 -47
- data/lib/rake_vault/version.rb +1 -1
- data/rake_vault.gemspec +2 -3
- metadata +10 -24
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf89d259e2b88648b7a012f14a3357ec8782321e9af3acfc7c19ba080334a513
|
|
4
|
+
data.tar.gz: a8347066908364325ba8fb3f1d5f1b135641b751e1b85906b7adea06f671aee7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7320877d13bedb84c7caca9aabb1feec20a6cd3654efcfa12ed87218edca417dc2908efec1873f587e576f8053920fc58ebe85962acc2aef7a57638d69611730
|
|
7
|
+
data.tar.gz: 40e8dd27ca40adf62ba4541087a686451436b98af66062db42bd763033cf8f522a1f30c37ee9fd7461828435be782c654fa8c76fb03582687bf377c3d8d5e1db
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rake_vault (0.5.0.pre.2)
|
|
4
|
+
rake_vault (0.5.0.pre.2.pr119.1.1)
|
|
5
5
|
colored2 (~> 3.1)
|
|
6
6
|
rake_dependencies (~> 3.7)
|
|
7
7
|
rake_factory (~> 0.33)
|
|
@@ -11,79 +11,83 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
activesupport (
|
|
14
|
+
activesupport (8.1.3)
|
|
15
15
|
base64
|
|
16
16
|
bigdecimal
|
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
18
18
|
connection_pool (>= 2.2.5)
|
|
19
19
|
drb
|
|
20
20
|
i18n (>= 1.6, < 2)
|
|
21
|
+
json
|
|
22
|
+
logger (>= 1.4.2)
|
|
21
23
|
minitest (>= 5.1)
|
|
22
|
-
|
|
23
|
-
tzinfo (~> 2.0)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
securerandom (>= 0.3)
|
|
25
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
26
|
+
uri (>= 0.13.1)
|
|
27
|
+
addressable (2.9.0)
|
|
28
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
29
|
+
ast (2.4.3)
|
|
27
30
|
aws-eventstream (1.3.0)
|
|
28
31
|
aws-sigv4 (1.8.0)
|
|
29
32
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
30
|
-
base64 (0.
|
|
31
|
-
bigdecimal (
|
|
33
|
+
base64 (0.3.0)
|
|
34
|
+
bigdecimal (4.1.2)
|
|
32
35
|
childprocess (5.0.0)
|
|
33
36
|
colored2 (3.1.2)
|
|
34
|
-
concurrent-ruby (1.3.
|
|
35
|
-
connection_pool (
|
|
36
|
-
diff-lcs (1.
|
|
37
|
+
concurrent-ruby (1.3.8)
|
|
38
|
+
connection_pool (3.0.2)
|
|
39
|
+
diff-lcs (1.6.2)
|
|
37
40
|
docile (1.4.0)
|
|
38
41
|
down (5.4.2)
|
|
39
42
|
addressable (~> 2.8)
|
|
40
|
-
drb (2.2.
|
|
41
|
-
excon (
|
|
42
|
-
faraday (2.10.0)
|
|
43
|
-
faraday-net_http (>= 2.0, < 3.2)
|
|
43
|
+
drb (2.2.3)
|
|
44
|
+
excon (1.6.0)
|
|
44
45
|
logger
|
|
45
|
-
faraday
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
faraday (2.14.3)
|
|
47
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
48
|
+
json
|
|
49
|
+
logger
|
|
50
|
+
faraday-net_http (3.4.4)
|
|
51
|
+
net-http (~> 0.5)
|
|
52
|
+
ffi (1.17.4)
|
|
53
|
+
ffi (1.17.4-arm64-darwin)
|
|
54
|
+
ffi (1.17.4-x86_64-darwin)
|
|
55
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
56
|
+
gem-release (2.2.4)
|
|
48
57
|
git (1.19.1)
|
|
49
58
|
addressable (~> 2.8)
|
|
50
59
|
rchardet (~> 1.8)
|
|
51
60
|
hamster (3.0.0)
|
|
52
61
|
concurrent-ruby (~> 1.0)
|
|
53
|
-
i18n (1.
|
|
62
|
+
i18n (1.15.2)
|
|
54
63
|
concurrent-ruby (~> 1.0)
|
|
55
|
-
immutable-struct (2.
|
|
56
|
-
json (2.
|
|
57
|
-
language_server-protocol (3.17.0.
|
|
64
|
+
immutable-struct (2.5.0)
|
|
65
|
+
json (2.12.2)
|
|
66
|
+
language_server-protocol (3.17.0.5)
|
|
58
67
|
lino (4.1.0)
|
|
59
68
|
childprocess (~> 5.0.0)
|
|
60
69
|
hamster (~> 3.0)
|
|
61
70
|
open4 (~> 1.3)
|
|
62
|
-
|
|
71
|
+
lint_roller (1.1.0)
|
|
72
|
+
logger (1.7.0)
|
|
63
73
|
memfs (1.0.0)
|
|
64
74
|
minitar (0.9)
|
|
65
|
-
minitest (5.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
octokit (8.1.0)
|
|
70
|
-
base64
|
|
75
|
+
minitest (5.27.0)
|
|
76
|
+
net-http (0.9.1)
|
|
77
|
+
uri (>= 0.11.1)
|
|
78
|
+
octokit (10.0.0)
|
|
71
79
|
faraday (>= 1, < 3)
|
|
72
80
|
sawyer (~> 0.9)
|
|
73
81
|
open4 (1.3.4)
|
|
74
|
-
parallel (1.
|
|
75
|
-
parser (3.3.
|
|
82
|
+
parallel (1.27.0)
|
|
83
|
+
parser (3.3.8.0)
|
|
76
84
|
ast (~> 2.4.1)
|
|
77
85
|
racc
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
prism (1.4.0)
|
|
87
|
+
public_suffix (7.0.5)
|
|
88
|
+
racc (1.8.1)
|
|
80
89
|
rainbow (3.1.1)
|
|
81
|
-
rake (13.2
|
|
82
|
-
rake_circle_ci (0.11.0)
|
|
83
|
-
colored2 (~> 3.1)
|
|
84
|
-
excon (~> 0.72)
|
|
85
|
-
rake_factory (~> 0.23)
|
|
86
|
-
sshkey (~> 2.0)
|
|
90
|
+
rake (13.4.2)
|
|
87
91
|
rake_dependencies (3.9.0)
|
|
88
92
|
down (~> 5.3)
|
|
89
93
|
hamster (~> 3.0)
|
|
@@ -97,57 +101,61 @@ GEM
|
|
|
97
101
|
colored2 (~> 3.1)
|
|
98
102
|
git (~> 1.13, >= 1.13.2)
|
|
99
103
|
rake_factory (~> 0.33)
|
|
100
|
-
rake_git_crypt (0.
|
|
104
|
+
rake_git_crypt (0.4.0)
|
|
101
105
|
colored2 (~> 3.1)
|
|
106
|
+
lino (~> 4.1)
|
|
102
107
|
rake_factory (~> 0.33)
|
|
103
108
|
ruby_git_crypt (~> 0.1)
|
|
104
109
|
ruby_gpg2 (~> 0.12)
|
|
105
|
-
rake_github (0.
|
|
110
|
+
rake_github (0.17.0)
|
|
106
111
|
colored2 (~> 3.1)
|
|
107
|
-
octokit (>=
|
|
108
|
-
rake_factory (~> 0.
|
|
112
|
+
octokit (>= 7.0, < 11.0)
|
|
113
|
+
rake_factory (~> 0.33)
|
|
114
|
+
rbnacl (~> 7.1)
|
|
109
115
|
sshkey (~> 2.0)
|
|
110
116
|
rake_gpg (0.20.0)
|
|
111
117
|
rake_factory (~> 0.33)
|
|
112
118
|
ruby_gpg2 (~> 0.12)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
rake_factory (~> 0.
|
|
116
|
-
|
|
119
|
+
rake_slack (0.3.0)
|
|
120
|
+
excon (>= 0.72, < 2.0)
|
|
121
|
+
rake_factory (~> 0.33)
|
|
122
|
+
rbnacl (7.1.2)
|
|
123
|
+
ffi (~> 1)
|
|
117
124
|
rchardet (1.8.0)
|
|
118
|
-
regexp_parser (2.
|
|
119
|
-
|
|
120
|
-
strscan
|
|
121
|
-
rspec (3.13.0)
|
|
125
|
+
regexp_parser (2.10.0)
|
|
126
|
+
rspec (3.13.1)
|
|
122
127
|
rspec-core (~> 3.13.0)
|
|
123
128
|
rspec-expectations (~> 3.13.0)
|
|
124
129
|
rspec-mocks (~> 3.13.0)
|
|
125
|
-
rspec-core (3.13.
|
|
130
|
+
rspec-core (3.13.4)
|
|
126
131
|
rspec-support (~> 3.13.0)
|
|
127
|
-
rspec-expectations (3.13.
|
|
132
|
+
rspec-expectations (3.13.5)
|
|
128
133
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
129
134
|
rspec-support (~> 3.13.0)
|
|
130
|
-
rspec-mocks (3.13.
|
|
135
|
+
rspec-mocks (3.13.5)
|
|
131
136
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
132
137
|
rspec-support (~> 3.13.0)
|
|
133
|
-
rspec-support (3.13.
|
|
134
|
-
rubocop (1.
|
|
138
|
+
rspec-support (3.13.4)
|
|
139
|
+
rubocop (1.76.0)
|
|
135
140
|
json (~> 2.3)
|
|
136
|
-
language_server-protocol (
|
|
141
|
+
language_server-protocol (~> 3.17.0.2)
|
|
142
|
+
lint_roller (~> 1.1.0)
|
|
137
143
|
parallel (~> 1.10)
|
|
138
144
|
parser (>= 3.3.0.2)
|
|
139
145
|
rainbow (>= 2.2.2, < 4.0)
|
|
140
|
-
regexp_parser (>= 2.
|
|
141
|
-
|
|
142
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
146
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
147
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
143
148
|
ruby-progressbar (~> 1.7)
|
|
144
|
-
unicode-display_width (>= 2.4.0, <
|
|
145
|
-
rubocop-ast (1.
|
|
146
|
-
parser (>= 3.3.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
rubocop (
|
|
149
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
150
|
+
rubocop-ast (1.45.0)
|
|
151
|
+
parser (>= 3.3.7.2)
|
|
152
|
+
prism (~> 1.4)
|
|
153
|
+
rubocop-rake (0.7.1)
|
|
154
|
+
lint_roller (~> 1.1)
|
|
155
|
+
rubocop (>= 1.72.1)
|
|
156
|
+
rubocop-rspec (3.6.0)
|
|
157
|
+
lint_roller (~> 1.1)
|
|
158
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
151
159
|
ruby-progressbar (1.13.0)
|
|
152
160
|
ruby_git_crypt (0.1.0)
|
|
153
161
|
immutable-struct (~> 2.4)
|
|
@@ -158,9 +166,10 @@ GEM
|
|
|
158
166
|
immutable-struct (~> 2.4)
|
|
159
167
|
lino (>= 4.1)
|
|
160
168
|
rubyzip (2.3.2)
|
|
161
|
-
sawyer (0.9.
|
|
169
|
+
sawyer (0.9.3)
|
|
162
170
|
addressable (>= 2.3.5)
|
|
163
171
|
faraday (>= 0.17.3, < 3)
|
|
172
|
+
securerandom (0.4.1)
|
|
164
173
|
simplecov (0.22.0)
|
|
165
174
|
docile (~> 1.1)
|
|
166
175
|
simplecov-html (~> 0.11)
|
|
@@ -168,11 +177,12 @@ GEM
|
|
|
168
177
|
simplecov-html (0.12.3)
|
|
169
178
|
simplecov_json_formatter (0.1.4)
|
|
170
179
|
sshkey (2.0.0)
|
|
171
|
-
strscan (3.1.0)
|
|
172
180
|
tzinfo (2.0.6)
|
|
173
181
|
concurrent-ruby (~> 1.0)
|
|
174
|
-
unicode-display_width (
|
|
175
|
-
|
|
182
|
+
unicode-display_width (3.1.4)
|
|
183
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
184
|
+
unicode-emoji (4.0.4)
|
|
185
|
+
uri (1.1.1)
|
|
176
186
|
vault (0.18.2)
|
|
177
187
|
aws-sigv4
|
|
178
188
|
|
|
@@ -189,12 +199,11 @@ DEPENDENCIES
|
|
|
189
199
|
gem-release
|
|
190
200
|
memfs
|
|
191
201
|
rake
|
|
192
|
-
rake_circle_ci
|
|
193
202
|
rake_git
|
|
194
203
|
rake_git_crypt
|
|
195
204
|
rake_github
|
|
196
205
|
rake_gpg
|
|
197
|
-
|
|
206
|
+
rake_slack
|
|
198
207
|
rake_vault!
|
|
199
208
|
rspec
|
|
200
209
|
rubocop
|
data/README.md
CHANGED
|
@@ -34,16 +34,16 @@ release a new version, update the version number in `version.rb`, and then run
|
|
|
34
34
|
git commits and tags, and push the `.gem` file to
|
|
35
35
|
[rubygems.org](https://rubygems.org).
|
|
36
36
|
|
|
37
|
-
### Managing
|
|
37
|
+
### Managing CI keys
|
|
38
38
|
|
|
39
|
-
To encrypt a GPG key for use by
|
|
39
|
+
To encrypt a GPG key for use by CI:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
42
|
openssl aes-256-cbc \
|
|
43
43
|
-e \
|
|
44
44
|
-md sha1 \
|
|
45
45
|
-in ./config/secrets/ci/gpg.private \
|
|
46
|
-
-out ./.
|
|
46
|
+
-out ./.github/gpg.private.enc \
|
|
47
47
|
-k "<passphrase>"
|
|
48
48
|
```
|
|
49
49
|
|
|
@@ -53,7 +53,7 @@ To check decryption is working correctly:
|
|
|
53
53
|
openssl aes-256-cbc \
|
|
54
54
|
-d \
|
|
55
55
|
-md sha1 \
|
|
56
|
-
-in ./.
|
|
56
|
+
-in ./.github/gpg.private.enc \
|
|
57
57
|
-k "<passphrase>"
|
|
58
58
|
```
|
|
59
59
|
|
data/Rakefile
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'rake_circle_ci'
|
|
4
3
|
require 'rake_git'
|
|
5
4
|
require 'rake_git_crypt'
|
|
6
5
|
require 'rake_github'
|
|
7
6
|
require 'rake_gpg'
|
|
8
|
-
require '
|
|
7
|
+
require 'rake_slack'
|
|
9
8
|
require 'rspec/core/rake_task'
|
|
10
9
|
require 'rubocop/rake_task'
|
|
11
10
|
require 'securerandom'
|
|
12
|
-
require 'yaml'
|
|
13
11
|
|
|
14
12
|
task default: %i[
|
|
15
13
|
library:fix
|
|
@@ -59,13 +57,6 @@ namespace :encryption do
|
|
|
59
57
|
end
|
|
60
58
|
|
|
61
59
|
namespace :keys do
|
|
62
|
-
namespace :deploy do
|
|
63
|
-
RakeSSH.define_key_tasks(
|
|
64
|
-
path: 'config/secrets/ci/',
|
|
65
|
-
comment: 'maintainers@infrablocks.io'
|
|
66
|
-
)
|
|
67
|
-
end
|
|
68
|
-
|
|
69
60
|
namespace :gpg do
|
|
70
61
|
RakeGPG.define_generate_key_task(
|
|
71
62
|
output_directory: 'config/secrets/ci',
|
|
@@ -91,7 +82,6 @@ namespace :secrets do
|
|
|
91
82
|
desc 'Generate all generatable secrets.'
|
|
92
83
|
task generate: %w[
|
|
93
84
|
encryption:passphrase:generate
|
|
94
|
-
keys:deploy:generate
|
|
95
85
|
keys:gpg:generate
|
|
96
86
|
]
|
|
97
87
|
|
|
@@ -115,57 +105,81 @@ namespace :library do
|
|
|
115
105
|
|
|
116
106
|
desc 'Attempt to automatically fix issues with the library'
|
|
117
107
|
task fix: [:'rubocop:autocorrect_all']
|
|
108
|
+
|
|
109
|
+
desc 'Build the library'
|
|
110
|
+
task :build do
|
|
111
|
+
sh 'gem build rake_vault.gemspec'
|
|
112
|
+
end
|
|
118
113
|
end
|
|
119
114
|
|
|
120
115
|
namespace :test do
|
|
121
116
|
RSpec::Core::RakeTask.new(:unit)
|
|
122
117
|
end
|
|
123
118
|
|
|
124
|
-
RakeCircleCI.define_project_tasks(
|
|
125
|
-
namespace: :circle_ci,
|
|
126
|
-
project_slug: 'github/infrablocks/rake_vault'
|
|
127
|
-
) do |t|
|
|
128
|
-
circle_ci_config =
|
|
129
|
-
YAML.load_file('config/secrets/circle_ci/config.yaml')
|
|
130
|
-
|
|
131
|
-
t.api_token = circle_ci_config['circle_ci_api_token']
|
|
132
|
-
t.environment_variables = {
|
|
133
|
-
ENCRYPTION_PASSPHRASE:
|
|
134
|
-
File.read('config/secrets/ci/encryption.passphrase')
|
|
135
|
-
.chomp
|
|
136
|
-
}
|
|
137
|
-
t.checkout_keys = []
|
|
138
|
-
t.ssh_keys = [
|
|
139
|
-
{
|
|
140
|
-
hostname: 'github.com',
|
|
141
|
-
private_key: File.read('config/secrets/ci/ssh.private')
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
end
|
|
145
|
-
|
|
146
119
|
RakeGithub.define_repository_tasks(
|
|
147
120
|
namespace: :github,
|
|
148
121
|
repository: 'infrablocks/rake_vault'
|
|
149
122
|
) do |t|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
123
|
+
t.access_token = resolve_github_token
|
|
124
|
+
|
|
125
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
126
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
127
|
+
# same-repo human PRs. Guard against a locked clone: without
|
|
128
|
+
# it, File.read returns git-crypt ciphertext and github:secrets:ensure
|
|
129
|
+
# silently uploads garbage that only surfaces much later as an opaque
|
|
130
|
+
# GPG unlock failure in the release job.
|
|
131
|
+
passphrase_path = 'config/secrets/ci/encryption.passphrase'
|
|
132
|
+
unless File.exist?(passphrase_path)
|
|
133
|
+
raise "Passphrase file not found: #{passphrase_path} — expected a " \
|
|
134
|
+
'git-crypt-unlocked clone with the CI secrets present'
|
|
135
|
+
end
|
|
136
|
+
passphrase = File.binread(passphrase_path)
|
|
137
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
138
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the ' \
|
|
139
|
+
'clone before provisioning'
|
|
140
|
+
end
|
|
141
|
+
t.secrets = [
|
|
142
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
159
143
|
]
|
|
144
|
+
t.environments = [
|
|
145
|
+
{ name: 'release',
|
|
146
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
147
|
+
]
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
namespace :slack do
|
|
151
|
+
RakeSlack.define_notification_tasks do |t|
|
|
152
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
153
|
+
t.routing_rules = [
|
|
154
|
+
{ when: { type: 'on_hold' },
|
|
155
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
156
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
157
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
158
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
159
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
160
|
+
{ when: { outcome: 'success' },
|
|
161
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
162
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
163
|
+
# out of a popular channel while this pipeline beds in.
|
|
164
|
+
{ when: {},
|
|
165
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
166
|
+
]
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
namespace :repository do
|
|
171
|
+
desc 'Set the git author for CI'
|
|
172
|
+
task :set_ci_author do
|
|
173
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
174
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
175
|
+
end
|
|
160
176
|
end
|
|
161
177
|
|
|
162
178
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
179
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
180
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
181
|
+
github:secrets:ensure
|
|
182
|
+
github:environments:ensure
|
|
169
183
|
]
|
|
170
184
|
end
|
|
171
185
|
|
|
@@ -176,11 +190,64 @@ namespace :version do
|
|
|
176
190
|
end
|
|
177
191
|
end
|
|
178
192
|
|
|
193
|
+
namespace :prerelease do
|
|
194
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
195
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
196
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
197
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
198
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
version_file = 'lib/rake_vault/version.rb'
|
|
202
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
203
|
+
source = File.read(version_file)
|
|
204
|
+
base = source[version_pattern, 2]
|
|
205
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
206
|
+
|
|
207
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
208
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
209
|
+
gem_file = "rake_vault-#{version}.gem"
|
|
210
|
+
begin
|
|
211
|
+
File.write(version_file,
|
|
212
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
213
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
214
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
215
|
+
# (contrast the `release` task).
|
|
216
|
+
sh 'gem build rake_vault.gemspec'
|
|
217
|
+
sh "gem push #{gem_file}"
|
|
218
|
+
ensure
|
|
219
|
+
File.write(version_file, source)
|
|
220
|
+
rm_f gem_file
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
179
225
|
desc 'Release gem'
|
|
180
226
|
task :release do
|
|
181
227
|
sh 'gem release --tag --push'
|
|
182
228
|
end
|
|
183
229
|
|
|
230
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
231
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
232
|
+
# otherwise surface later as an opaque Octokit 401. An empty or
|
|
233
|
+
# whitespace-only GITHUB_TOKEN is treated as absent so an authenticated
|
|
234
|
+
# operator falls through to `gh auth token` rather than hitting the raise.
|
|
235
|
+
def resolve_github_token
|
|
236
|
+
github_token = ENV['GITHUB_TOKEN'].to_s.strip
|
|
237
|
+
github_token = gh_auth_token if github_token.empty?
|
|
238
|
+
if github_token.empty?
|
|
239
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
github_token
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
def gh_auth_token
|
|
246
|
+
`gh auth token`.strip
|
|
247
|
+
rescue Errno::ENOENT
|
|
248
|
+
''
|
|
249
|
+
end
|
|
250
|
+
|
|
184
251
|
def bump_version_for(version_type)
|
|
185
252
|
sh "gem bump --version #{version_type} " \
|
|
186
253
|
'&& bundle install ' \
|
data/lib/rake_vault/version.rb
CHANGED
data/rake_vault.gemspec
CHANGED
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
35
35
|
spec.require_paths = ['lib']
|
|
36
36
|
|
|
37
|
-
spec.required_ruby_version = '>= 3.
|
|
37
|
+
spec.required_ruby_version = '>= 3.3'
|
|
38
38
|
|
|
39
39
|
spec.add_dependency 'colored2', '~> 3.1'
|
|
40
40
|
spec.add_dependency 'rake_dependencies', '~> 3.7'
|
|
@@ -47,12 +47,11 @@ Gem::Specification.new do |spec|
|
|
|
47
47
|
spec.add_development_dependency 'gem-release'
|
|
48
48
|
spec.add_development_dependency 'memfs'
|
|
49
49
|
spec.add_development_dependency 'rake'
|
|
50
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
51
50
|
spec.add_development_dependency 'rake_git'
|
|
52
51
|
spec.add_development_dependency 'rake_git_crypt'
|
|
53
52
|
spec.add_development_dependency 'rake_github'
|
|
54
53
|
spec.add_development_dependency 'rake_gpg'
|
|
55
|
-
spec.add_development_dependency '
|
|
54
|
+
spec.add_development_dependency 'rake_slack'
|
|
56
55
|
spec.add_development_dependency 'rspec'
|
|
57
56
|
spec.add_development_dependency 'rubocop'
|
|
58
57
|
spec.add_development_dependency 'rubocop-rake'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rake_vault
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.0.pre.2
|
|
4
|
+
version: 0.5.0.pre.2.pr119.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- InfraBlocks Maintainers
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: colored2
|
|
@@ -150,20 +150,6 @@ dependencies:
|
|
|
150
150
|
- - ">="
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '0'
|
|
153
|
-
- !ruby/object:Gem::Dependency
|
|
154
|
-
name: rake_circle_ci
|
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
|
156
|
-
requirements:
|
|
157
|
-
- - ">="
|
|
158
|
-
- !ruby/object:Gem::Version
|
|
159
|
-
version: '0'
|
|
160
|
-
type: :development
|
|
161
|
-
prerelease: false
|
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
163
|
-
requirements:
|
|
164
|
-
- - ">="
|
|
165
|
-
- !ruby/object:Gem::Version
|
|
166
|
-
version: '0'
|
|
167
153
|
- !ruby/object:Gem::Dependency
|
|
168
154
|
name: rake_git
|
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -221,7 +207,7 @@ dependencies:
|
|
|
221
207
|
- !ruby/object:Gem::Version
|
|
222
208
|
version: '0'
|
|
223
209
|
- !ruby/object:Gem::Dependency
|
|
224
|
-
name:
|
|
210
|
+
name: rake_slack
|
|
225
211
|
requirement: !ruby/object:Gem::Requirement
|
|
226
212
|
requirements:
|
|
227
213
|
- - ">="
|
|
@@ -336,7 +322,7 @@ licenses:
|
|
|
336
322
|
- MIT
|
|
337
323
|
metadata:
|
|
338
324
|
rubygems_mfa_required: 'false'
|
|
339
|
-
post_install_message:
|
|
325
|
+
post_install_message:
|
|
340
326
|
rdoc_options: []
|
|
341
327
|
require_paths:
|
|
342
328
|
- lib
|
|
@@ -344,15 +330,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
344
330
|
requirements:
|
|
345
331
|
- - ">="
|
|
346
332
|
- !ruby/object:Gem::Version
|
|
347
|
-
version: '3.
|
|
333
|
+
version: '3.3'
|
|
348
334
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
335
|
requirements:
|
|
350
|
-
- - "
|
|
336
|
+
- - ">="
|
|
351
337
|
- !ruby/object:Gem::Version
|
|
352
|
-
version:
|
|
338
|
+
version: '0'
|
|
353
339
|
requirements: []
|
|
354
|
-
rubygems_version: 3.
|
|
355
|
-
signing_key:
|
|
340
|
+
rubygems_version: 3.5.22
|
|
341
|
+
signing_key:
|
|
356
342
|
specification_version: 4
|
|
357
343
|
summary: Rake tasks for interacting with Hashicorp Vault.
|
|
358
344
|
test_files: []
|