concourse.rb 0.6.0.pre.10 → 0.6.0.pre.11
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 +5 -0
- data/Gemfile.lock +90 -83
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/concourse.rb.gemspec +2 -3
- data/lib/concourse/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: 9598dbc3b702e56f48dad60a5d29ab31b4d06e2aadccbf27b81228c490b91486
|
|
4
|
+
data.tar.gz: 685eae6ae9ef54fd7456ce416a27bfe3fc704b3053c9a4056057496a32f94ebe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5106fabc8e53e667270d0e4bfb229c33c7b17100fa218d6e833490a64c2d01680d7aecc6bc1e1e7f77b86e6cc0b4bff3f7ac0c5b7f059d5479c58eec92e06e41
|
|
7
|
+
data.tar.gz: 0ff734f28e9584941b0d49635b3217b481efc831be7b3f7098de95731aa22aec497fb0ea7a8f45e87fc5cd216ebfd44a8cddb0fbcdc52e780c38f805c5959621
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,151 +1,157 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
concourse.rb (0.6.0.pre.
|
|
4
|
+
concourse.rb (0.6.0.pre.11)
|
|
5
5
|
excon (~> 0.72)
|
|
6
6
|
semantic (~> 1.5)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (
|
|
11
|
+
activesupport (8.1.3)
|
|
12
12
|
base64
|
|
13
13
|
bigdecimal
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
15
|
connection_pool (>= 2.2.5)
|
|
16
16
|
drb
|
|
17
17
|
i18n (>= 1.6, < 2)
|
|
18
|
+
json
|
|
19
|
+
logger (>= 1.4.2)
|
|
18
20
|
minitest (>= 5.1)
|
|
19
|
-
|
|
20
|
-
tzinfo (~> 2.0)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
securerandom (>= 0.3)
|
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
+
uri (>= 0.13.1)
|
|
24
|
+
addressable (2.9.0)
|
|
25
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
26
|
+
ast (2.4.3)
|
|
27
|
+
base64 (0.3.0)
|
|
28
|
+
bigdecimal (4.1.2)
|
|
26
29
|
childprocess (5.0.0)
|
|
27
30
|
colored2 (3.1.2)
|
|
28
|
-
concurrent-ruby (1.3.
|
|
29
|
-
connection_pool (
|
|
30
|
-
diff-lcs (1.
|
|
31
|
+
concurrent-ruby (1.3.8)
|
|
32
|
+
connection_pool (3.0.2)
|
|
33
|
+
diff-lcs (1.6.2)
|
|
31
34
|
docile (1.4.1)
|
|
32
|
-
drb (2.2.
|
|
33
|
-
excon (0.
|
|
34
|
-
faker (3.
|
|
35
|
+
drb (2.2.3)
|
|
36
|
+
excon (0.112.0)
|
|
37
|
+
faker (3.5.1)
|
|
35
38
|
i18n (>= 1.8.11, < 2)
|
|
36
|
-
faraday (2.
|
|
37
|
-
faraday-net_http (>= 2.0, < 3.
|
|
39
|
+
faraday (2.14.3)
|
|
40
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
41
|
+
json
|
|
38
42
|
logger
|
|
39
|
-
faraday-net_http (3.
|
|
40
|
-
net-http
|
|
41
|
-
|
|
43
|
+
faraday-net_http (3.4.4)
|
|
44
|
+
net-http (~> 0.5)
|
|
45
|
+
ffi (1.17.4)
|
|
46
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
47
|
+
gem-release (2.2.4)
|
|
42
48
|
git (1.19.1)
|
|
43
49
|
addressable (~> 2.8)
|
|
44
50
|
rchardet (~> 1.8)
|
|
45
51
|
hamster (3.0.0)
|
|
46
52
|
concurrent-ruby (~> 1.0)
|
|
47
|
-
i18n (1.
|
|
53
|
+
i18n (1.15.2)
|
|
48
54
|
concurrent-ruby (~> 1.0)
|
|
49
|
-
immutable-struct (2.
|
|
50
|
-
json (2.
|
|
51
|
-
jwt (2.
|
|
55
|
+
immutable-struct (2.5.0)
|
|
56
|
+
json (2.21.1)
|
|
57
|
+
jwt (2.10.1)
|
|
52
58
|
base64
|
|
53
|
-
language_server-protocol (3.17.0.
|
|
59
|
+
language_server-protocol (3.17.0.5)
|
|
54
60
|
lino (4.1.0)
|
|
55
61
|
childprocess (~> 5.0.0)
|
|
56
62
|
hamster (~> 3.0)
|
|
57
63
|
open4 (~> 1.3)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
net-http (0.
|
|
62
|
-
uri
|
|
63
|
-
octokit (
|
|
64
|
-
base64
|
|
64
|
+
lint_roller (1.1.0)
|
|
65
|
+
logger (1.7.0)
|
|
66
|
+
minitest (5.27.0)
|
|
67
|
+
net-http (0.9.1)
|
|
68
|
+
uri (>= 0.11.1)
|
|
69
|
+
octokit (10.0.0)
|
|
65
70
|
faraday (>= 1, < 3)
|
|
66
71
|
sawyer (~> 0.9)
|
|
67
72
|
open4 (1.3.4)
|
|
68
|
-
openssl (3.
|
|
69
|
-
parallel (1.
|
|
70
|
-
parser (3.3.
|
|
73
|
+
openssl (3.3.0)
|
|
74
|
+
parallel (1.27.0)
|
|
75
|
+
parser (3.3.8.0)
|
|
71
76
|
ast (~> 2.4.1)
|
|
72
77
|
racc
|
|
73
|
-
|
|
74
|
-
|
|
78
|
+
prism (1.4.0)
|
|
79
|
+
public_suffix (7.0.5)
|
|
80
|
+
racc (1.8.1)
|
|
75
81
|
rainbow (3.1.1)
|
|
76
|
-
rake (13.2
|
|
77
|
-
|
|
78
|
-
colored2 (~> 3.1)
|
|
79
|
-
excon (~> 0.72)
|
|
80
|
-
rake_factory (~> 0.33)
|
|
81
|
-
sshkey (~> 2.0)
|
|
82
|
-
rake_factory (0.34.0.pre.2)
|
|
82
|
+
rake (13.4.2)
|
|
83
|
+
rake_factory (0.33.0)
|
|
83
84
|
activesupport (>= 4)
|
|
84
85
|
rake (~> 13.0)
|
|
85
|
-
rake_git (0.
|
|
86
|
+
rake_git (0.2.0)
|
|
86
87
|
colored2 (~> 3.1)
|
|
87
88
|
git (~> 1.13, >= 1.13.2)
|
|
88
89
|
rake_factory (~> 0.33)
|
|
89
|
-
rake_git_crypt (0.
|
|
90
|
+
rake_git_crypt (0.4.0)
|
|
90
91
|
colored2 (~> 3.1)
|
|
92
|
+
lino (~> 4.1)
|
|
91
93
|
rake_factory (~> 0.33)
|
|
92
94
|
ruby_git_crypt (~> 0.1)
|
|
93
95
|
ruby_gpg2 (~> 0.12)
|
|
94
|
-
rake_github (0.
|
|
96
|
+
rake_github (0.17.0)
|
|
95
97
|
colored2 (~> 3.1)
|
|
96
|
-
octokit (>=
|
|
98
|
+
octokit (>= 7.0, < 11.0)
|
|
97
99
|
rake_factory (~> 0.33)
|
|
100
|
+
rbnacl (~> 7.1)
|
|
98
101
|
sshkey (~> 2.0)
|
|
99
102
|
rake_gpg (0.20.0)
|
|
100
103
|
rake_factory (~> 0.33)
|
|
101
104
|
ruby_gpg2 (~> 0.12)
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
rake_slack (0.3.0)
|
|
106
|
+
excon (>= 0.72, < 2.0)
|
|
104
107
|
rake_factory (~> 0.33)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
rspec (3.13.0)
|
|
108
|
+
rbnacl (7.1.2)
|
|
109
|
+
ffi (~> 1)
|
|
110
|
+
rchardet (1.10.2)
|
|
111
|
+
regexp_parser (2.10.0)
|
|
112
|
+
rspec (3.13.1)
|
|
111
113
|
rspec-core (~> 3.13.0)
|
|
112
114
|
rspec-expectations (~> 3.13.0)
|
|
113
115
|
rspec-mocks (~> 3.13.0)
|
|
114
|
-
rspec-core (3.13.
|
|
116
|
+
rspec-core (3.13.4)
|
|
115
117
|
rspec-support (~> 3.13.0)
|
|
116
|
-
rspec-expectations (3.13.
|
|
118
|
+
rspec-expectations (3.13.5)
|
|
117
119
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
118
120
|
rspec-support (~> 3.13.0)
|
|
119
|
-
rspec-mocks (3.13.
|
|
121
|
+
rspec-mocks (3.13.5)
|
|
120
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
121
123
|
rspec-support (~> 3.13.0)
|
|
122
|
-
rspec-support (3.13.
|
|
123
|
-
rubocop (1.
|
|
124
|
+
rspec-support (3.13.4)
|
|
125
|
+
rubocop (1.76.0)
|
|
124
126
|
json (~> 2.3)
|
|
125
|
-
language_server-protocol (
|
|
127
|
+
language_server-protocol (~> 3.17.0.2)
|
|
128
|
+
lint_roller (~> 1.1.0)
|
|
126
129
|
parallel (~> 1.10)
|
|
127
130
|
parser (>= 3.3.0.2)
|
|
128
131
|
rainbow (>= 2.2.2, < 4.0)
|
|
129
|
-
regexp_parser (>= 2.
|
|
130
|
-
|
|
131
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
132
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
133
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
132
134
|
ruby-progressbar (~> 1.7)
|
|
133
|
-
unicode-display_width (>= 2.4.0, <
|
|
134
|
-
rubocop-ast (1.
|
|
135
|
-
parser (>= 3.3.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
rubocop (
|
|
135
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
136
|
+
rubocop-ast (1.45.0)
|
|
137
|
+
parser (>= 3.3.7.2)
|
|
138
|
+
prism (~> 1.4)
|
|
139
|
+
rubocop-rake (0.7.1)
|
|
140
|
+
lint_roller (~> 1.1)
|
|
141
|
+
rubocop (>= 1.72.1)
|
|
142
|
+
rubocop-rspec (3.6.0)
|
|
143
|
+
lint_roller (~> 1.1)
|
|
144
|
+
rubocop (~> 1.72, >= 1.72.1)
|
|
140
145
|
ruby-progressbar (1.13.0)
|
|
141
|
-
ruby_git_crypt (0.
|
|
146
|
+
ruby_git_crypt (0.1.0)
|
|
142
147
|
immutable-struct (~> 2.4)
|
|
143
148
|
lino (>= 4.1)
|
|
144
149
|
ruby_gpg2 (0.12.0)
|
|
145
150
|
lino (>= 4.1)
|
|
146
|
-
sawyer (0.9.
|
|
151
|
+
sawyer (0.9.3)
|
|
147
152
|
addressable (>= 2.3.5)
|
|
148
153
|
faraday (>= 0.17.3, < 3)
|
|
154
|
+
securerandom (0.4.1)
|
|
149
155
|
semantic (1.6.1)
|
|
150
156
|
simplecov (0.22.0)
|
|
151
157
|
docile (~> 1.1)
|
|
@@ -154,15 +160,15 @@ GEM
|
|
|
154
160
|
simplecov-html (0.12.3)
|
|
155
161
|
simplecov_json_formatter (0.1.4)
|
|
156
162
|
sshkey (2.0.0)
|
|
157
|
-
strscan (3.1.0)
|
|
158
163
|
tzinfo (2.0.6)
|
|
159
164
|
concurrent-ruby (~> 1.0)
|
|
160
|
-
unicode-display_width (
|
|
161
|
-
|
|
165
|
+
unicode-display_width (3.1.4)
|
|
166
|
+
unicode-emoji (~> 4.0, >= 4.0.4)
|
|
167
|
+
unicode-emoji (4.0.4)
|
|
168
|
+
uri (1.1.1)
|
|
162
169
|
|
|
163
170
|
PLATFORMS
|
|
164
171
|
ruby
|
|
165
|
-
x86_64-darwin-19
|
|
166
172
|
x86_64-linux
|
|
167
173
|
|
|
168
174
|
DEPENDENCIES
|
|
@@ -173,16 +179,17 @@ DEPENDENCIES
|
|
|
173
179
|
jwt
|
|
174
180
|
openssl
|
|
175
181
|
rake
|
|
176
|
-
|
|
177
|
-
rake_git
|
|
178
|
-
rake_git_crypt
|
|
182
|
+
rake_factory (~> 0.33.0)
|
|
183
|
+
rake_git (~> 0.2.0)
|
|
184
|
+
rake_git_crypt (~> 0.4.0)
|
|
179
185
|
rake_github
|
|
180
186
|
rake_gpg
|
|
181
|
-
|
|
187
|
+
rake_slack
|
|
182
188
|
rspec
|
|
183
189
|
rubocop
|
|
184
190
|
rubocop-rake
|
|
185
191
|
rubocop-rspec
|
|
192
|
+
ruby_git_crypt (~> 0.1.0)
|
|
186
193
|
simplecov
|
|
187
194
|
|
|
188
195
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -56,16 +56,16 @@ experiment.
|
|
|
56
56
|
|
|
57
57
|
### Common Tasks
|
|
58
58
|
|
|
59
|
-
#### Managing
|
|
59
|
+
#### Managing CI keys
|
|
60
60
|
|
|
61
|
-
To encrypt a GPG key for use by
|
|
61
|
+
To encrypt a GPG key for use by CI:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
64
|
openssl aes-256-cbc \
|
|
65
65
|
-e \
|
|
66
66
|
-md sha1 \
|
|
67
67
|
-in ./config/secrets/ci/gpg.private \
|
|
68
|
-
-out ./.
|
|
68
|
+
-out ./.github/gpg.private.enc \
|
|
69
69
|
-k "<passphrase>"
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -75,7 +75,7 @@ To check decryption is working correctly:
|
|
|
75
75
|
openssl aes-256-cbc \
|
|
76
76
|
-d \
|
|
77
77
|
-md sha1 \
|
|
78
|
-
-in ./.
|
|
78
|
+
-in ./.github/gpg.private.enc \
|
|
79
79
|
-k "<passphrase>"
|
|
80
80
|
```
|
|
81
81
|
|
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 concourse.rb.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/concourse.rb'
|
|
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/concourse.rb'
|
|
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/concourse/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 = "concourse.rb-#{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 concourse.rb.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/concourse.rb.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 'excon', '~> 0.72'
|
|
40
40
|
spec.add_dependency 'semantic', '~> 1.5'
|
|
@@ -45,12 +45,11 @@ Gem::Specification.new do |spec|
|
|
|
45
45
|
spec.add_development_dependency 'jwt'
|
|
46
46
|
spec.add_development_dependency 'openssl'
|
|
47
47
|
spec.add_development_dependency 'rake'
|
|
48
|
-
spec.add_development_dependency 'rake_circle_ci'
|
|
49
48
|
spec.add_development_dependency 'rake_git'
|
|
50
49
|
spec.add_development_dependency 'rake_git_crypt'
|
|
51
50
|
spec.add_development_dependency 'rake_github'
|
|
52
51
|
spec.add_development_dependency 'rake_gpg'
|
|
53
|
-
spec.add_development_dependency '
|
|
52
|
+
spec.add_development_dependency 'rake_slack'
|
|
54
53
|
spec.add_development_dependency 'rspec'
|
|
55
54
|
spec.add_development_dependency 'rubocop'
|
|
56
55
|
spec.add_development_dependency 'rubocop-rake'
|
data/lib/concourse/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: concourse.rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.0.pre.
|
|
4
|
+
version: 0.6.0.pre.11
|
|
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: excon
|
|
@@ -122,20 +122,6 @@ dependencies:
|
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: rake_circle_ci
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - ">="
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '0'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - ">="
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: '0'
|
|
139
125
|
- !ruby/object:Gem::Dependency
|
|
140
126
|
name: rake_git
|
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -193,7 +179,7 @@ dependencies:
|
|
|
193
179
|
- !ruby/object:Gem::Version
|
|
194
180
|
version: '0'
|
|
195
181
|
- !ruby/object:Gem::Dependency
|
|
196
|
-
name:
|
|
182
|
+
name: rake_slack
|
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
|
198
184
|
requirements:
|
|
199
185
|
- - ">="
|
|
@@ -308,7 +294,7 @@ licenses:
|
|
|
308
294
|
- MIT
|
|
309
295
|
metadata:
|
|
310
296
|
rubygems_mfa_required: 'false'
|
|
311
|
-
post_install_message:
|
|
297
|
+
post_install_message:
|
|
312
298
|
rdoc_options: []
|
|
313
299
|
require_paths:
|
|
314
300
|
- lib
|
|
@@ -316,15 +302,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
316
302
|
requirements:
|
|
317
303
|
- - ">="
|
|
318
304
|
- !ruby/object:Gem::Version
|
|
319
|
-
version: '3.
|
|
305
|
+
version: '3.3'
|
|
320
306
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
321
307
|
requirements:
|
|
322
|
-
- - "
|
|
308
|
+
- - ">="
|
|
323
309
|
- !ruby/object:Gem::Version
|
|
324
|
-
version:
|
|
310
|
+
version: '0'
|
|
325
311
|
requirements: []
|
|
326
|
-
rubygems_version: 3.
|
|
327
|
-
signing_key:
|
|
312
|
+
rubygems_version: 3.5.22
|
|
313
|
+
signing_key:
|
|
328
314
|
specification_version: 4
|
|
329
315
|
summary: A Ruby SDK for the Concourse CI API.
|
|
330
316
|
test_files: []
|