concourse 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/concourse.rb +2 -51
- data/lib/concourse/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9b176d5c1682d74e157a90faa442d31c9fe937d
|
4
|
+
data.tar.gz: 0a25c82ab963a61bf0168542666665fa766b2688
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c477899a40f8b92a07a6300d5e1f340cf18f50028d925f2bc3e8aac78910955765f3bf2848d784dbbddbbcbe94820ac6706db4cf053502e44f71455fb403d617
|
7
|
+
data.tar.gz: 39f8caf1d70b661fcee196474342050cd8249a3b62255accf8dad3fbd039a67d9ad20a52ecfaafefafe829bd35a2a66eab45be6306dfeaf305cb3b45d791a925
|
data/CHANGELOG.md
CHANGED
data/lib/concourse.rb
CHANGED
@@ -28,9 +28,9 @@ class Concourse
|
|
28
28
|
matching_line.split(/ +/)[1]
|
29
29
|
end
|
30
30
|
|
31
|
-
def initialize project_name,
|
31
|
+
def initialize project_name, args={}
|
32
32
|
@project_name = project_name
|
33
|
-
@directory = directory
|
33
|
+
@directory = args[:directory] || DEFAULT_DIRECTORY
|
34
34
|
@pipeline_filename = File.join(@directory, "#{project_name}.final.yml")
|
35
35
|
@pipeline_erb_filename = File.join(@directory, "#{project_name}.yml")
|
36
36
|
@private_var_file = File.join(@directory, "private.yml")
|
@@ -158,25 +158,6 @@ class Concourse
|
|
158
158
|
|
159
159
|
sh "fly -t #{fly_target} abort-build -j #{pipeline_job} -b #{build_id}"
|
160
160
|
end
|
161
|
-
# fly -t flavorjones-oss-concourse builds | fgrep started | awk '{print "-j", $2, "-b", $3}' | xargs -d "\n" -n1 echo fly -t flavorjones-oss-concourse abort-build | bash
|
162
|
-
end
|
163
|
-
|
164
|
-
#
|
165
|
-
# badge commands
|
166
|
-
#
|
167
|
-
desc "display a list of jobs and badge urls"
|
168
|
-
task "badges", [:fly_target, :team_name] => "generate" do |t, args|
|
169
|
-
fly_target = Concourse.validate_fly_target t, args
|
170
|
-
team_name = args[:team_name] || "main"
|
171
|
-
|
172
|
-
puts ""
|
173
|
-
puts "| Build | Status |"
|
174
|
-
puts "|--|--|"
|
175
|
-
|
176
|
-
each_job do |job|
|
177
|
-
job_name = job["name"]
|
178
|
-
puts "| #{titleize job_name} | #{markdown_badge fly_target, team_name, job_name} |"
|
179
|
-
end
|
180
161
|
end
|
181
162
|
end
|
182
163
|
end
|
@@ -204,34 +185,4 @@ class Concourse
|
|
204
185
|
end
|
205
186
|
nil
|
206
187
|
end
|
207
|
-
|
208
|
-
def titleize string
|
209
|
-
string.gsub(/[^a-zA-Z0-9\.]/, " ")
|
210
|
-
end
|
211
|
-
|
212
|
-
def markdown_badge fly_target, team_name, job_name
|
213
|
-
url_prefix = Concourse.url_for fly_target
|
214
|
-
"[![name](#{badge_url_for(url_prefix, team_name, job_name)})](#{job_url_for(url_prefix, team_name, job_name)})"
|
215
|
-
end
|
216
|
-
|
217
|
-
def badge_url_for url_prefix, team_name, job_name
|
218
|
-
File.join url_prefix,
|
219
|
-
"api/v1/teams",
|
220
|
-
team_name,
|
221
|
-
"pipelines",
|
222
|
-
project_name,
|
223
|
-
"jobs",
|
224
|
-
job_name,
|
225
|
-
"badge"
|
226
|
-
end
|
227
|
-
|
228
|
-
def job_url_for url_prefix, team_name, job_name
|
229
|
-
File.join url_prefix,
|
230
|
-
"teams",
|
231
|
-
team_name,
|
232
|
-
"pipelines",
|
233
|
-
project_name,
|
234
|
-
"jobs",
|
235
|
-
job_name
|
236
|
-
end
|
237
188
|
end
|
data/lib/concourse/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concourse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|