8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/local_ci/generator/buildkite.rb', line 8
def self.steps
{
"steps" => LocalCI.flows.flat_map do |flow|
step = {}
if flow.parallel?
step["group"] = flow.heading
step["steps"] = []
flow.jobs.each do |job|
step["steps"] << {
"label" => job.name,
"commands" => [
"bundle check &> /dev/null || bundle install",
"bundle exec rake #{job.task}"
]
}
end
else
step["label"] = flow.heading
step["commands"] = [
"bundle check &> /dev/null || bundle install",
"bundle exec rake #{flow.task}"
]
end
[step, "wait"]
end
}
end
|