confidante 0.29.0.pre.9 → 0.29.0.pre.9.pr169.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 +7 -0
- data/Gemfile.lock +106 -89
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/confidante.gemspec +2 -3
- data/lib/confidante/converters/evaluating_converter.rb +1 -1
- data/lib/confidante/version.rb +1 -1
- 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: 3d567cde733322904e47e5893b987a2423c9e28b4ba834bbcc0bde3756e753cb
|
|
4
|
+
data.tar.gz: 4f5dc7520f6b7c09569445e707a36913cfe3d927e053b25c8958420522c88116
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66d8fc7f5f93e13de2418e70262f96d9809b0c8e00a009e561c97b92e299eae59eb1ce604950cc7302ac2aa57a81a539133f91cada690bf1984c853d828c0d68
|
|
7
|
+
data.tar.gz: 3c0eb7c56cca971234b029af36ee8f6415e01881f29a94099be39ff50b970bf3c9e77ffafb867bf9755f364885b3b9ecf1b40759200d7d70bc3c4f80a6819154
|
data/Gemfile
CHANGED
|
@@ -4,3 +4,10 @@ source 'https://rubygems.org'
|
|
|
4
4
|
|
|
5
5
|
# Specify dependencies in confidante.gemspec
|
|
6
6
|
gemspec
|
|
7
|
+
|
|
8
|
+
# Hold stable lines: a floor-only requirement lets bundler prefer a
|
|
9
|
+
# prerelease even when a stable release satisfies every dependant.
|
|
10
|
+
gem 'rake_factory', '~> 0.33.0'
|
|
11
|
+
gem 'rake_git', '~> 0.2.0'
|
|
12
|
+
gem 'rake_git_crypt', '~> 0.4.0'
|
|
13
|
+
gem 'ruby_git_crypt', '~> 0.1.0'
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
confidante (0.29.0.pre.9)
|
|
4
|
+
confidante (0.29.0.pre.9.pr169.1.1)
|
|
5
5
|
activesupport (>= 4)
|
|
6
6
|
hiera (~> 3.3)
|
|
7
7
|
shikashi (~> 0.6)
|
|
@@ -10,40 +10,50 @@ PATH
|
|
|
10
10
|
GEM
|
|
11
11
|
remote: https://rubygems.org/
|
|
12
12
|
specs:
|
|
13
|
-
activesupport (
|
|
13
|
+
activesupport (8.1.3)
|
|
14
14
|
base64
|
|
15
15
|
bigdecimal
|
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
17
|
connection_pool (>= 2.2.5)
|
|
18
18
|
drb
|
|
19
19
|
i18n (>= 1.6, < 2)
|
|
20
|
+
json
|
|
21
|
+
logger (>= 1.4.2)
|
|
20
22
|
minitest (>= 5.1)
|
|
21
|
-
|
|
22
|
-
tzinfo (~> 2.0)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
securerandom (>= 0.3)
|
|
24
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
|
+
uri (>= 0.13.1)
|
|
26
|
+
addressable (2.9.0)
|
|
27
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
28
|
+
ast (2.4.3)
|
|
26
29
|
aws-eventstream (1.3.0)
|
|
27
30
|
aws-sigv4 (1.7.0)
|
|
28
31
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
29
|
-
base64 (0.
|
|
30
|
-
bigdecimal (
|
|
32
|
+
base64 (0.3.0)
|
|
33
|
+
bigdecimal (4.1.2)
|
|
34
|
+
childprocess (5.0.0)
|
|
31
35
|
colored2 (3.1.2)
|
|
32
|
-
concurrent-ruby (1.3.
|
|
33
|
-
connection_pool (
|
|
34
|
-
diff-lcs (1.
|
|
36
|
+
concurrent-ruby (1.3.8)
|
|
37
|
+
connection_pool (3.0.2)
|
|
38
|
+
diff-lcs (1.6.2)
|
|
35
39
|
docile (1.4.0)
|
|
36
|
-
drb (2.2.
|
|
40
|
+
drb (2.2.3)
|
|
37
41
|
evalhook (0.6.0)
|
|
38
42
|
partialruby (~> 0.3)
|
|
39
43
|
sexp_processor (~> 4.0)
|
|
40
|
-
excon (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
faraday-net_http (>= 2.0, < 3.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
excon (1.6.0)
|
|
45
|
+
logger
|
|
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)
|
|
47
57
|
getsource (0.2.2)
|
|
48
58
|
git (1.19.1)
|
|
49
59
|
addressable (~> 2.8)
|
|
@@ -51,109 +61,113 @@ GEM
|
|
|
51
61
|
hamster (3.0.0)
|
|
52
62
|
concurrent-ruby (~> 1.0)
|
|
53
63
|
hiera (3.12.0)
|
|
54
|
-
i18n (1.
|
|
64
|
+
i18n (1.15.2)
|
|
55
65
|
concurrent-ruby (~> 1.0)
|
|
56
|
-
immutable-struct (2.
|
|
57
|
-
json (2.
|
|
58
|
-
language_server-protocol (3.17.0.
|
|
59
|
-
lino (
|
|
66
|
+
immutable-struct (2.5.0)
|
|
67
|
+
json (2.21.1)
|
|
68
|
+
language_server-protocol (3.17.0.5)
|
|
69
|
+
lino (4.1.0)
|
|
70
|
+
childprocess (~> 5.0.0)
|
|
60
71
|
hamster (~> 3.0)
|
|
61
72
|
open4 (~> 1.3)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
lint_roller (1.1.0)
|
|
74
|
+
logger (1.7.0)
|
|
75
|
+
minitest (5.27.0)
|
|
76
|
+
net-http (0.9.1)
|
|
77
|
+
uri (>= 0.11.1)
|
|
78
|
+
octokit (10.0.0)
|
|
65
79
|
faraday (>= 1, < 3)
|
|
66
80
|
sawyer (~> 0.9)
|
|
67
81
|
open4 (1.3.4)
|
|
68
|
-
parallel (1.
|
|
69
|
-
parser (3.3.
|
|
82
|
+
parallel (1.27.0)
|
|
83
|
+
parser (3.3.8.0)
|
|
70
84
|
ast (~> 2.4.1)
|
|
71
85
|
racc
|
|
72
86
|
partialruby (0.3.0)
|
|
73
87
|
ruby2ruby (~> 2)
|
|
74
88
|
ruby_parser (~> 3)
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
prism (1.4.0)
|
|
90
|
+
public_suffix (7.0.5)
|
|
91
|
+
racc (1.8.1)
|
|
77
92
|
rainbow (3.1.1)
|
|
78
|
-
rake (13.2
|
|
79
|
-
|
|
80
|
-
colored2 (~> 3.1)
|
|
81
|
-
excon (~> 0.72)
|
|
82
|
-
rake_factory (~> 0.23)
|
|
83
|
-
sshkey (~> 2.0)
|
|
84
|
-
rake_factory (0.32.0.pre.2)
|
|
93
|
+
rake (13.4.2)
|
|
94
|
+
rake_factory (0.33.0)
|
|
85
95
|
activesupport (>= 4)
|
|
86
96
|
rake (~> 13.0)
|
|
87
|
-
rake_git (0.
|
|
97
|
+
rake_git (0.2.0)
|
|
88
98
|
colored2 (~> 3.1)
|
|
89
99
|
git (~> 1.13, >= 1.13.2)
|
|
90
|
-
rake_factory (
|
|
91
|
-
rake_git_crypt (0.
|
|
100
|
+
rake_factory (~> 0.33)
|
|
101
|
+
rake_git_crypt (0.4.0)
|
|
92
102
|
colored2 (~> 3.1)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
octokit (>= 4.16, < 9.0)
|
|
99
|
-
rake_factory (~> 0.23)
|
|
100
|
-
sshkey (~> 2.0)
|
|
101
|
-
rake_gpg (0.18.0)
|
|
102
|
-
rake_factory (~> 0.23)
|
|
103
|
-
ruby_gpg2 (~> 0.6)
|
|
104
|
-
rake_ssh (0.10.0)
|
|
103
|
+
lino (~> 4.1)
|
|
104
|
+
rake_factory (~> 0.33)
|
|
105
|
+
ruby_git_crypt (~> 0.1)
|
|
106
|
+
ruby_gpg2 (~> 0.12)
|
|
107
|
+
rake_github (0.17.0)
|
|
105
108
|
colored2 (~> 3.1)
|
|
106
|
-
|
|
109
|
+
octokit (>= 7.0, < 11.0)
|
|
110
|
+
rake_factory (~> 0.33)
|
|
111
|
+
rbnacl (~> 7.1)
|
|
107
112
|
sshkey (~> 2.0)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
rake_gpg (0.20.0)
|
|
114
|
+
rake_factory (~> 0.33)
|
|
115
|
+
ruby_gpg2 (~> 0.12)
|
|
116
|
+
rake_slack (0.3.0)
|
|
117
|
+
excon (>= 0.72, < 2.0)
|
|
118
|
+
rake_factory (~> 0.33)
|
|
119
|
+
rbnacl (7.1.2)
|
|
120
|
+
ffi (~> 1)
|
|
121
|
+
rchardet (1.10.2)
|
|
122
|
+
regexp_parser (2.10.0)
|
|
123
|
+
rspec (3.13.1)
|
|
113
124
|
rspec-core (~> 3.13.0)
|
|
114
125
|
rspec-expectations (~> 3.13.0)
|
|
115
126
|
rspec-mocks (~> 3.13.0)
|
|
116
|
-
rspec-core (3.13.
|
|
127
|
+
rspec-core (3.13.4)
|
|
117
128
|
rspec-support (~> 3.13.0)
|
|
118
|
-
rspec-expectations (3.13.
|
|
129
|
+
rspec-expectations (3.13.5)
|
|
119
130
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
120
131
|
rspec-support (~> 3.13.0)
|
|
121
|
-
rspec-mocks (3.13.
|
|
132
|
+
rspec-mocks (3.13.5)
|
|
122
133
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
123
134
|
rspec-support (~> 3.13.0)
|
|
124
|
-
rspec-support (3.13.
|
|
125
|
-
rubocop (1.
|
|
135
|
+
rspec-support (3.13.4)
|
|
136
|
+
rubocop (1.76.0)
|
|
126
137
|
json (~> 2.3)
|
|
127
|
-
language_server-protocol (
|
|
138
|
+
language_server-protocol (~> 3.17.0.2)
|
|
139
|
+
lint_roller (~> 1.1.0)
|
|
128
140
|
parallel (~> 1.10)
|
|
129
141
|
parser (>= 3.3.0.2)
|
|
130
142
|
rainbow (>= 2.2.2, < 4.0)
|
|
131
|
-
regexp_parser (>= 2.
|
|
132
|
-
|
|
133
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
143
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
144
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
134
145
|
ruby-progressbar (~> 1.7)
|
|
135
|
-
unicode-display_width (>= 2.4.0, <
|
|
136
|
-
rubocop-ast (1.
|
|
137
|
-
parser (>= 3.3.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
rubocop (
|
|
146
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
147
|
+
rubocop-ast (1.45.0)
|
|
148
|
+
parser (>= 3.3.7.2)
|
|
149
|
+
prism (~> 1.4)
|
|
150
|
+
rubocop-rake (0.7.1)
|
|
151
|
+
lint_roller (~> 1.1)
|
|
152
|
+
rubocop (>= 1.72.1)
|
|
153
|
+
rubocop-rspec (3.6.0)
|
|
154
|
+
lint_roller (~> 1.1)
|
|
155
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
142
156
|
ruby-progressbar (1.13.0)
|
|
143
|
-
ruby2_keywords (0.0.5)
|
|
144
157
|
ruby2ruby (2.5.0)
|
|
145
158
|
ruby_parser (~> 3.1)
|
|
146
159
|
sexp_processor (~> 4.6)
|
|
147
|
-
ruby_git_crypt (0.1.0
|
|
160
|
+
ruby_git_crypt (0.1.0)
|
|
148
161
|
immutable-struct (~> 2.4)
|
|
149
|
-
lino (
|
|
150
|
-
ruby_gpg2 (0.
|
|
151
|
-
lino (
|
|
162
|
+
lino (>= 4.1)
|
|
163
|
+
ruby_gpg2 (0.12.0)
|
|
164
|
+
lino (>= 4.1)
|
|
152
165
|
ruby_parser (3.20.3)
|
|
153
166
|
sexp_processor (~> 4.16)
|
|
154
|
-
sawyer (0.9.
|
|
167
|
+
sawyer (0.9.3)
|
|
155
168
|
addressable (>= 2.3.5)
|
|
156
169
|
faraday (>= 0.17.3, < 3)
|
|
170
|
+
securerandom (0.4.1)
|
|
157
171
|
sexp_processor (4.17.0)
|
|
158
172
|
shikashi (0.6.0)
|
|
159
173
|
evalhook (>= 0.6.0)
|
|
@@ -165,10 +179,12 @@ GEM
|
|
|
165
179
|
simplecov-html (0.12.3)
|
|
166
180
|
simplecov_json_formatter (0.1.4)
|
|
167
181
|
sshkey (2.0.0)
|
|
168
|
-
strscan (3.1.0)
|
|
169
182
|
tzinfo (2.0.6)
|
|
170
183
|
concurrent-ruby (~> 1.0)
|
|
171
|
-
unicode-display_width (
|
|
184
|
+
unicode-display_width (3.1.4)
|
|
185
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
186
|
+
unicode-emoji (4.0.4)
|
|
187
|
+
uri (1.1.1)
|
|
172
188
|
vault (0.18.2)
|
|
173
189
|
aws-sigv4
|
|
174
190
|
|
|
@@ -186,16 +202,17 @@ DEPENDENCIES
|
|
|
186
202
|
confidante!
|
|
187
203
|
gem-release
|
|
188
204
|
rake
|
|
189
|
-
|
|
190
|
-
rake_git
|
|
191
|
-
rake_git_crypt
|
|
205
|
+
rake_factory (~> 0.33.0)
|
|
206
|
+
rake_git (~> 0.2.0)
|
|
207
|
+
rake_git_crypt (~> 0.4.0)
|
|
192
208
|
rake_github
|
|
193
209
|
rake_gpg
|
|
194
|
-
|
|
210
|
+
rake_slack
|
|
195
211
|
rspec
|
|
196
212
|
rubocop
|
|
197
213
|
rubocop-rake
|
|
198
214
|
rubocop-rspec
|
|
215
|
+
ruby_git_crypt (~> 0.1.0)
|
|
199
216
|
simplecov
|
|
200
217
|
|
|
201
218
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -45,16 +45,16 @@ To generate an SSH key pair:
|
|
|
45
45
|
ssh-keygen -m PEM -t rsa -b 4096 -C maintainers@infrablocks.io -N '' -f config/secrets/ci/ssh
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
#### Managing
|
|
48
|
+
#### Managing CI keys
|
|
49
49
|
|
|
50
|
-
To encrypt a GPG key for use by
|
|
50
|
+
To encrypt a GPG key for use by CI:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
53
|
openssl aes-256-cbc \
|
|
54
54
|
-e \
|
|
55
55
|
-md sha1 \
|
|
56
56
|
-in ./config/secrets/ci/gpg.private \
|
|
57
|
-
-out ./.
|
|
57
|
+
-out ./.github/gpg.private.enc \
|
|
58
58
|
-k "<passphrase>"
|
|
59
59
|
```
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ To check decryption is working correctly:
|
|
|
64
64
|
openssl aes-256-cbc \
|
|
65
65
|
-d \
|
|
66
66
|
-md sha1 \
|
|
67
|
-
-in ./.
|
|
67
|
+
-in ./.github/gpg.private.enc \
|
|
68
68
|
-k "<passphrase>"
|
|
69
69
|
```
|
|
70
70
|
|
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,98 @@ 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 confidante.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/confidante'
|
|
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/confidante'
|
|
149
122
|
) do |t|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
123
|
+
# Operator's ambient auth. Resolve once and fail fast: a missing,
|
|
124
|
+
# unauthenticated, or absent gh yields an empty string, which would
|
|
125
|
+
# otherwise surface later as an opaque Octokit 401. An empty or
|
|
126
|
+
# whitespace-only GITHUB_TOKEN is treated as absent so an authenticated
|
|
127
|
+
# operator falls through to `gh auth token` rather than hitting the raise.
|
|
128
|
+
github_token = ENV['GITHUB_TOKEN'].to_s.strip
|
|
129
|
+
if github_token.empty?
|
|
130
|
+
github_token = begin
|
|
131
|
+
`gh auth token`
|
|
132
|
+
rescue Errno::ENOENT
|
|
133
|
+
''
|
|
134
|
+
end.strip
|
|
135
|
+
end
|
|
136
|
+
if github_token.empty?
|
|
137
|
+
raise 'No GitHub token available: set GITHUB_TOKEN or run `gh auth login`'
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
t.access_token = github_token
|
|
141
|
+
|
|
142
|
+
# Actions store only: dependabot runs never reach the passphrase — the
|
|
143
|
+
# only pr.yaml job that unlocks git-crypt (prerelease) is guarded to
|
|
144
|
+
# same-repo human PRs. Guard against a locked clone: without
|
|
145
|
+
# it, File.read returns git-crypt ciphertext and github:secrets:ensure
|
|
146
|
+
# silently uploads garbage that only surfaces much later as an opaque
|
|
147
|
+
# GPG unlock failure in the release job.
|
|
148
|
+
passphrase_path = 'config/secrets/ci/encryption.passphrase'
|
|
149
|
+
unless File.exist?(passphrase_path)
|
|
150
|
+
raise "Passphrase file not found: #{passphrase_path} — expected a " \
|
|
151
|
+
'git-crypt-unlocked clone with the CI secrets present'
|
|
152
|
+
end
|
|
153
|
+
passphrase = File.binread(passphrase_path)
|
|
154
|
+
if passphrase.start_with?("\x00GITCRYPT")
|
|
155
|
+
raise 'encryption.passphrase is git-crypt ciphertext — unlock the ' \
|
|
156
|
+
'clone before provisioning'
|
|
157
|
+
end
|
|
158
|
+
t.secrets = [
|
|
159
|
+
{ name: 'ENCRYPTION_PASSPHRASE', value: passphrase.chomp }
|
|
159
160
|
]
|
|
161
|
+
t.environments = [
|
|
162
|
+
{ name: 'release',
|
|
163
|
+
reviewers: [{ team: 'maintainers' }] }
|
|
164
|
+
]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
namespace :slack do
|
|
168
|
+
RakeSlack.define_notification_tasks do |t|
|
|
169
|
+
t.bot_token = ENV.fetch('SLACK_BOT_TOKEN', nil)
|
|
170
|
+
t.routing_rules = [
|
|
171
|
+
{ when: { type: 'on_hold' },
|
|
172
|
+
channel: 'C038EDCRSQJ', format: :on_hold }, # release
|
|
173
|
+
{ when: { actor: 'dependabot[bot]', outcome: 'success' },
|
|
174
|
+
channel: 'C03N711HVDG', format: :success }, # builds-dependabot
|
|
175
|
+
{ when: { actor: 'dependabot[bot]' },
|
|
176
|
+
channel: 'C03N711HVDG', format: :failure }, # builds-dependabot
|
|
177
|
+
{ when: { outcome: 'success' },
|
|
178
|
+
channel: 'C023XUE76GH', format: :success }, # builds
|
|
179
|
+
# Failures go to builds, not team-dev (org default), to keep noise
|
|
180
|
+
# out of a popular channel while this pipeline beds in.
|
|
181
|
+
{ when: {},
|
|
182
|
+
channel: 'C023XUE76GH', format: :failure } # builds
|
|
183
|
+
]
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
namespace :repository do
|
|
188
|
+
desc 'Set the git author for CI'
|
|
189
|
+
task :set_ci_author do
|
|
190
|
+
sh 'git config --global user.name "InfraBlocks CI"'
|
|
191
|
+
sh 'git config --global user.email "ci@infrablocks.io"'
|
|
192
|
+
end
|
|
160
193
|
end
|
|
161
194
|
|
|
162
195
|
namespace :pipeline do
|
|
163
|
-
desc 'Prepare
|
|
196
|
+
desc 'Prepare GitHub Actions pipeline'
|
|
164
197
|
task prepare: %i[
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
circle_ci:ssh_keys:ensure
|
|
168
|
-
github:deploy_keys:ensure
|
|
198
|
+
github:secrets:ensure
|
|
199
|
+
github:environments:ensure
|
|
169
200
|
]
|
|
170
201
|
end
|
|
171
202
|
|
|
@@ -176,6 +207,38 @@ namespace :version do
|
|
|
176
207
|
end
|
|
177
208
|
end
|
|
178
209
|
|
|
210
|
+
namespace :prerelease do
|
|
211
|
+
desc 'Build and push a namespaced pre-release to RubyGems ' \
|
|
212
|
+
'(PR CI only; no bump, no tag, no commit, no push)'
|
|
213
|
+
task :publish, %i[pr_number run_number run_attempt] do |_, args|
|
|
214
|
+
%i[pr_number run_number run_attempt].each do |name|
|
|
215
|
+
raise "Missing task argument: #{name}" if args[name].to_s.empty?
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
version_file = 'lib/confidante/version.rb'
|
|
219
|
+
version_pattern = /(VERSION\s*=\s*')([^']+)(')/
|
|
220
|
+
source = File.read(version_file)
|
|
221
|
+
base = source[version_pattern, 2]
|
|
222
|
+
raise "Could not read VERSION from #{version_file}" unless base
|
|
223
|
+
|
|
224
|
+
version = "#{base}.pr#{args.pr_number}" \
|
|
225
|
+
".#{args.run_number}.#{args.run_attempt}"
|
|
226
|
+
gem_file = "confidante-#{version}.gem"
|
|
227
|
+
begin
|
|
228
|
+
File.write(version_file,
|
|
229
|
+
source.sub(version_pattern, "\\1#{version}\\3"))
|
|
230
|
+
# Build + push directly: `gem release` aborts on the (deliberately)
|
|
231
|
+
# uncommitted version rewrite. PR CI must not tag, commit, or push
|
|
232
|
+
# (contrast the `release` task).
|
|
233
|
+
sh 'gem build confidante.gemspec'
|
|
234
|
+
sh "gem push #{gem_file}"
|
|
235
|
+
ensure
|
|
236
|
+
File.write(version_file, source)
|
|
237
|
+
rm_f gem_file
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
179
242
|
desc 'Release gem'
|
|
180
243
|
task :release do
|
|
181
244
|
sh 'gem release --tag --push'
|
data/confidante.gemspec
CHANGED
|
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
|
36
36
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
37
37
|
spec.require_paths = ['lib']
|
|
38
38
|
|
|
39
|
-
spec.required_ruby_version = '>= 3.
|
|
39
|
+
spec.required_ruby_version = '>= 3.3'
|
|
40
40
|
|
|
41
41
|
spec.add_dependency 'activesupport', '>= 4'
|
|
42
42
|
spec.add_dependency 'hiera', '~> 3.3'
|
|
@@ -46,12 +46,11 @@ Gem::Specification.new do |spec|
|
|
|
46
46
|
spec.add_development_dependency 'bundler'
|
|
47
47
|
spec.add_development_dependency 'gem-release'
|
|
48
48
|
spec.add_development_dependency 'rake'
|
|
49
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
50
49
|
spec.add_development_dependency 'rake_git'
|
|
51
50
|
spec.add_development_dependency 'rake_git_crypt'
|
|
52
51
|
spec.add_development_dependency 'rake_github'
|
|
53
52
|
spec.add_development_dependency 'rake_gpg'
|
|
54
|
-
spec.add_development_dependency '
|
|
53
|
+
spec.add_development_dependency 'rake_slack'
|
|
55
54
|
spec.add_development_dependency 'rspec'
|
|
56
55
|
spec.add_development_dependency 'rubocop'
|
|
57
56
|
spec.add_development_dependency 'rubocop-rake'
|
data/lib/confidante/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: confidante
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.29.0.pre.9
|
|
4
|
+
version: 0.29.0.pre.9.pr169.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-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -108,20 +108,6 @@ dependencies:
|
|
|
108
108
|
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: rake_circle_ci
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - ">="
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0'
|
|
125
111
|
- !ruby/object:Gem::Dependency
|
|
126
112
|
name: rake_git
|
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -179,7 +165,7 @@ dependencies:
|
|
|
179
165
|
- !ruby/object:Gem::Version
|
|
180
166
|
version: '0'
|
|
181
167
|
- !ruby/object:Gem::Dependency
|
|
182
|
-
name:
|
|
168
|
+
name: rake_slack
|
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
|
184
170
|
requirements:
|
|
185
171
|
- - ">="
|
|
@@ -293,7 +279,7 @@ licenses:
|
|
|
293
279
|
- MIT
|
|
294
280
|
metadata:
|
|
295
281
|
rubygems_mfa_required: 'false'
|
|
296
|
-
post_install_message:
|
|
282
|
+
post_install_message:
|
|
297
283
|
rdoc_options: []
|
|
298
284
|
require_paths:
|
|
299
285
|
- lib
|
|
@@ -301,15 +287,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
301
287
|
requirements:
|
|
302
288
|
- - ">="
|
|
303
289
|
- !ruby/object:Gem::Version
|
|
304
|
-
version: '3.
|
|
290
|
+
version: '3.3'
|
|
305
291
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
292
|
requirements:
|
|
307
|
-
- - "
|
|
293
|
+
- - ">="
|
|
308
294
|
- !ruby/object:Gem::Version
|
|
309
|
-
version:
|
|
295
|
+
version: '0'
|
|
310
296
|
requirements: []
|
|
311
|
-
rubygems_version: 3.
|
|
312
|
-
signing_key:
|
|
297
|
+
rubygems_version: 3.5.22
|
|
298
|
+
signing_key:
|
|
313
299
|
specification_version: 4
|
|
314
300
|
summary: A configuration engine over hiera.
|
|
315
301
|
test_files: []
|