concourse.rb 0.6.0.pre.9 → 0.6.0.pre.10.pr209.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 +5 -0
- data/Gemfile.lock +108 -94
- data/README.md +4 -4
- data/Rakefile +110 -47
- data/concourse.rb.gemspec +2 -3
- data/lib/concourse/http.rb +1 -1
- data/lib/concourse/sub_clients/skymarshal_client.rb +4 -4
- 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: 90309ea48601161080f3ec49641e753c029fa1d7ec42c87f8bf7ac5bfe2f12bc
|
|
4
|
+
data.tar.gz: 8740c9ddef9d726f649d14eaf8ab18105b2ddd9f4f72d747e3793ad6f06b6923
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 47b57ddf6d199821b046ea54fe06302b731d5fba0ad844f5b2f6ca9e0f8276fa88cb7801e49a53dcbeaf12e14c6238c3c012fa724b1fc69d988ae410d3955890
|
|
7
|
+
data.tar.gz: 624b06f896cfc30501df9eeb8a5c32bac11e064431bbfaa923bf4f6e4151dcfa882f4c9b8bf53b4c275418dc36267de1fb38a94ec771e7e17027e4732afd02fb
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,145 +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.10.pr209.1.1)
|
|
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)
|
|
29
|
+
childprocess (5.0.0)
|
|
26
30
|
colored2 (3.1.2)
|
|
27
|
-
concurrent-ruby (1.3.
|
|
28
|
-
connection_pool (
|
|
29
|
-
diff-lcs (1.
|
|
30
|
-
docile (1.4.
|
|
31
|
-
drb (2.2.
|
|
32
|
-
excon (0.
|
|
33
|
-
faker (3.
|
|
31
|
+
concurrent-ruby (1.3.8)
|
|
32
|
+
connection_pool (3.0.2)
|
|
33
|
+
diff-lcs (1.6.2)
|
|
34
|
+
docile (1.4.1)
|
|
35
|
+
drb (2.2.3)
|
|
36
|
+
excon (0.112.0)
|
|
37
|
+
faker (3.5.1)
|
|
34
38
|
i18n (>= 1.8.11, < 2)
|
|
35
|
-
faraday (2.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
faraday-net_http (3.
|
|
40
|
-
|
|
39
|
+
faraday (2.14.3)
|
|
40
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
41
|
+
json
|
|
42
|
+
logger
|
|
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)
|
|
41
48
|
git (1.19.1)
|
|
42
49
|
addressable (~> 2.8)
|
|
43
50
|
rchardet (~> 1.8)
|
|
44
51
|
hamster (3.0.0)
|
|
45
52
|
concurrent-ruby (~> 1.0)
|
|
46
|
-
i18n (1.
|
|
53
|
+
i18n (1.15.2)
|
|
47
54
|
concurrent-ruby (~> 1.0)
|
|
48
|
-
immutable-struct (2.
|
|
49
|
-
json (2.
|
|
50
|
-
jwt (2.
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
immutable-struct (2.5.0)
|
|
56
|
+
json (2.21.1)
|
|
57
|
+
jwt (2.10.1)
|
|
58
|
+
base64
|
|
59
|
+
language_server-protocol (3.17.0.5)
|
|
60
|
+
lino (4.1.0)
|
|
61
|
+
childprocess (~> 5.0.0)
|
|
53
62
|
hamster (~> 3.0)
|
|
54
63
|
open4 (~> 1.3)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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)
|
|
58
70
|
faraday (>= 1, < 3)
|
|
59
71
|
sawyer (~> 0.9)
|
|
60
72
|
open4 (1.3.4)
|
|
61
|
-
openssl (3.
|
|
62
|
-
parallel (1.
|
|
63
|
-
parser (3.3.
|
|
73
|
+
openssl (3.3.0)
|
|
74
|
+
parallel (1.27.0)
|
|
75
|
+
parser (3.3.8.0)
|
|
64
76
|
ast (~> 2.4.1)
|
|
65
77
|
racc
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
prism (1.4.0)
|
|
79
|
+
public_suffix (7.0.5)
|
|
80
|
+
racc (1.8.1)
|
|
68
81
|
rainbow (3.1.1)
|
|
69
|
-
rake (13.
|
|
70
|
-
|
|
71
|
-
colored2 (~> 3.1)
|
|
72
|
-
excon (~> 0.72)
|
|
73
|
-
rake_factory (~> 0.23)
|
|
74
|
-
sshkey (~> 2.0)
|
|
75
|
-
rake_factory (0.32.0.pre.2)
|
|
82
|
+
rake (13.4.2)
|
|
83
|
+
rake_factory (0.33.0)
|
|
76
84
|
activesupport (>= 4)
|
|
77
85
|
rake (~> 13.0)
|
|
78
|
-
rake_git (0.
|
|
86
|
+
rake_git (0.2.0)
|
|
79
87
|
colored2 (~> 3.1)
|
|
80
88
|
git (~> 1.13, >= 1.13.2)
|
|
81
|
-
rake_factory (
|
|
82
|
-
rake_git_crypt (0.
|
|
83
|
-
colored2 (~> 3.1)
|
|
84
|
-
rake_factory (= 0.32.0.pre.2)
|
|
85
|
-
ruby_git_crypt (= 0.1.0.pre.4)
|
|
86
|
-
ruby_gpg2 (~> 0.6)
|
|
87
|
-
rake_github (0.13.0)
|
|
89
|
+
rake_factory (~> 0.33)
|
|
90
|
+
rake_git_crypt (0.4.0)
|
|
88
91
|
colored2 (~> 3.1)
|
|
89
|
-
|
|
90
|
-
rake_factory (~> 0.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
ruby_gpg2 (~> 0.6)
|
|
95
|
-
rake_ssh (0.10.0)
|
|
92
|
+
lino (~> 4.1)
|
|
93
|
+
rake_factory (~> 0.33)
|
|
94
|
+
ruby_git_crypt (~> 0.1)
|
|
95
|
+
ruby_gpg2 (~> 0.12)
|
|
96
|
+
rake_github (0.17.0)
|
|
96
97
|
colored2 (~> 3.1)
|
|
97
|
-
|
|
98
|
+
octokit (>= 7.0, < 11.0)
|
|
99
|
+
rake_factory (~> 0.33)
|
|
100
|
+
rbnacl (~> 7.1)
|
|
98
101
|
sshkey (~> 2.0)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
rake_gpg (0.20.0)
|
|
103
|
+
rake_factory (~> 0.33)
|
|
104
|
+
ruby_gpg2 (~> 0.12)
|
|
105
|
+
rake_slack (0.3.0)
|
|
106
|
+
excon (>= 0.72, < 2.0)
|
|
107
|
+
rake_factory (~> 0.33)
|
|
108
|
+
rbnacl (7.1.2)
|
|
109
|
+
ffi (~> 1)
|
|
110
|
+
rchardet (1.10.2)
|
|
111
|
+
regexp_parser (2.10.0)
|
|
112
|
+
rspec (3.13.1)
|
|
104
113
|
rspec-core (~> 3.13.0)
|
|
105
114
|
rspec-expectations (~> 3.13.0)
|
|
106
115
|
rspec-mocks (~> 3.13.0)
|
|
107
|
-
rspec-core (3.13.
|
|
116
|
+
rspec-core (3.13.4)
|
|
108
117
|
rspec-support (~> 3.13.0)
|
|
109
|
-
rspec-expectations (3.13.
|
|
118
|
+
rspec-expectations (3.13.5)
|
|
110
119
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
111
120
|
rspec-support (~> 3.13.0)
|
|
112
|
-
rspec-mocks (3.13.
|
|
121
|
+
rspec-mocks (3.13.5)
|
|
113
122
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
114
123
|
rspec-support (~> 3.13.0)
|
|
115
|
-
rspec-support (3.13.
|
|
116
|
-
rubocop (1.
|
|
124
|
+
rspec-support (3.13.4)
|
|
125
|
+
rubocop (1.76.0)
|
|
117
126
|
json (~> 2.3)
|
|
118
|
-
language_server-protocol (
|
|
127
|
+
language_server-protocol (~> 3.17.0.2)
|
|
128
|
+
lint_roller (~> 1.1.0)
|
|
119
129
|
parallel (~> 1.10)
|
|
120
130
|
parser (>= 3.3.0.2)
|
|
121
131
|
rainbow (>= 2.2.2, < 4.0)
|
|
122
|
-
regexp_parser (>= 2.
|
|
123
|
-
|
|
124
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
|
132
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
133
|
+
rubocop-ast (>= 1.45.0, < 2.0)
|
|
125
134
|
ruby-progressbar (~> 1.7)
|
|
126
|
-
unicode-display_width (>= 2.4.0, <
|
|
127
|
-
rubocop-ast (1.
|
|
128
|
-
parser (>= 3.3.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
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)
|
|
133
145
|
ruby-progressbar (1.13.0)
|
|
134
|
-
|
|
135
|
-
ruby_git_crypt (0.1.0.pre.4)
|
|
146
|
+
ruby_git_crypt (0.1.0)
|
|
136
147
|
immutable-struct (~> 2.4)
|
|
137
|
-
lino (
|
|
138
|
-
ruby_gpg2 (0.
|
|
139
|
-
lino (
|
|
140
|
-
sawyer (0.9.
|
|
148
|
+
lino (>= 4.1)
|
|
149
|
+
ruby_gpg2 (0.12.0)
|
|
150
|
+
lino (>= 4.1)
|
|
151
|
+
sawyer (0.9.3)
|
|
141
152
|
addressable (>= 2.3.5)
|
|
142
153
|
faraday (>= 0.17.3, < 3)
|
|
154
|
+
securerandom (0.4.1)
|
|
143
155
|
semantic (1.6.1)
|
|
144
156
|
simplecov (0.22.0)
|
|
145
157
|
docile (~> 1.1)
|
|
@@ -148,14 +160,15 @@ GEM
|
|
|
148
160
|
simplecov-html (0.12.3)
|
|
149
161
|
simplecov_json_formatter (0.1.4)
|
|
150
162
|
sshkey (2.0.0)
|
|
151
|
-
strscan (3.1.0)
|
|
152
163
|
tzinfo (2.0.6)
|
|
153
164
|
concurrent-ruby (~> 1.0)
|
|
154
|
-
unicode-display_width (
|
|
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)
|
|
155
169
|
|
|
156
170
|
PLATFORMS
|
|
157
171
|
ruby
|
|
158
|
-
x86_64-darwin-19
|
|
159
172
|
x86_64-linux
|
|
160
173
|
|
|
161
174
|
DEPENDENCIES
|
|
@@ -166,16 +179,17 @@ DEPENDENCIES
|
|
|
166
179
|
jwt
|
|
167
180
|
openssl
|
|
168
181
|
rake
|
|
169
|
-
|
|
170
|
-
rake_git
|
|
171
|
-
rake_git_crypt
|
|
182
|
+
rake_factory (~> 0.33.0)
|
|
183
|
+
rake_git (~> 0.2.0)
|
|
184
|
+
rake_git_crypt (~> 0.4.0)
|
|
172
185
|
rake_github
|
|
173
186
|
rake_gpg
|
|
174
|
-
|
|
187
|
+
rake_slack
|
|
175
188
|
rspec
|
|
176
189
|
rubocop
|
|
177
190
|
rubocop-rake
|
|
178
191
|
rubocop-rspec
|
|
192
|
+
ruby_git_crypt (~> 0.1.0)
|
|
179
193
|
simplecov
|
|
180
194
|
|
|
181
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 = '>=
|
|
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/http.rb
CHANGED
|
@@ -26,7 +26,7 @@ module Concourse
|
|
|
26
26
|
body = create_token_body(parameters)
|
|
27
27
|
|
|
28
28
|
token_request = Http::Request.new(url, headers, body)
|
|
29
|
-
token_response = Excon.post(url, headers
|
|
29
|
+
token_response = Excon.post(url, headers:, body:)
|
|
30
30
|
|
|
31
31
|
assert_successful(token_request, token_response)
|
|
32
32
|
token(token_response)
|
|
@@ -71,9 +71,9 @@ module Concourse
|
|
|
71
71
|
URI.encode_www_form(
|
|
72
72
|
{
|
|
73
73
|
grant_type: 'password',
|
|
74
|
-
username
|
|
75
|
-
password
|
|
76
|
-
scope:
|
|
74
|
+
username:,
|
|
75
|
+
password:,
|
|
76
|
+
scope:
|
|
77
77
|
}
|
|
78
78
|
)
|
|
79
79
|
end
|
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.10.pr209.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-20 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: '
|
|
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: []
|