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