Skip to content

Commit 5699cc1

Browse files
committed
bk
1 parent 5f431ba commit 5699cc1

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

lib/knapsack_pro/config/ci/buildkite.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def fixed_queue_split
4747
def ci_provider
4848
"Buildkite"
4949
end
50+
51+
def test_queue_id
52+
node_build_id # BUILDKITE_BUILD_ID or BUILDKITE_STEP_ID may work too
53+
end
5054
end
5155
end
5256
end

spec/knapsack_pro/config/ci/buildkite_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,17 @@
132132
it { should be nil }
133133
end
134134
end
135+
136+
[
137+
[{ 'BUILDKITE_BUILD_NUMBER' => '123' }, '123'],
138+
[{}, nil]
139+
].each do |env, expected|
140+
describe '#test_queue_id' do
141+
subject { described_class.new.test_queue_id }
142+
143+
let(:env) { env }
144+
145+
it { should eql expected }
146+
end
147+
end
135148
end

0 commit comments

Comments
 (0)