Skip to content

Commit 66df064

Browse files
committed
Use almalinux:8 for ppc64le el8 builds as it seems rocky doesn't have that arch
1 parent d3825bb commit 66df064

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

lib/ood_packaging/build_box.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class OodPackaging::BuildBox
1919
'amzn2023' => 'amazonlinux:2023'
2020
}.freeze
2121

22+
BASE_IMAGES_ARCH = {
23+
'el8-ppc64le' => 'almalinux:8'
24+
}.freeze
25+
2226
CODENAMES = {
2327
'ubuntu-20.04' => 'focal',
2428
'ubuntu-22.04' => 'jammy',
@@ -98,7 +102,7 @@ def valid_arches
98102
end
99103

100104
def base_image
101-
@base_image ||= BASE_IMAGES[dist]
105+
@base_image ||= BASE_IMAGES_ARCH["#{dist}-#{arch}"] || BASE_IMAGES[dist]
102106
end
103107

104108
def codename

spec/ood_packaging/build_box_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@
1919
end
2020
end
2121

22+
describe 'base_image' do
23+
it 'uses el8 box' do
24+
expect(build_box.base_image).to eq('rockylinux:8')
25+
end
26+
27+
context 'with el8 ppc64le' do
28+
let(:dist) { 'el8' }
29+
let(:arch) { 'ppc64le' }
30+
31+
it 'uses arch specific box' do
32+
expect(build_box.base_image).to eq('almalinux:8')
33+
end
34+
end
35+
end
36+
2237
describe 'build!' do
2338
before do
2439
allow(build_box).to receive(:build_gem)

0 commit comments

Comments
 (0)