Skip to content

Commit 5f4a685

Browse files
authored
ci(reusable_build_image): Add support for nested boil images (#1474)
* ci(reusable_build_image): Add support for nested boil images Note: Needed so that boil can find the config via the 'product-name', while using the 'namespace' and 'image-name' (without the parent directory) to tag the image with before pushing. * chore: Update changelog
1 parent 10d2439 commit 5f4a685

3 files changed

Lines changed: 24 additions & 5 deletions

File tree

.github/workflows/precompile_hadoop.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ jobs:
4747
contents: read
4848
with:
4949
product-name: precompiled/hadoop
50-
sdp-version: ${{ needs.generate_build_timestamp.outputs.unix_timestamp }}
5150
registry-namespace: precompiled
51+
image-name: hadoop
52+
sdp-version: ${{ needs.generate_build_timestamp.outputs.unix_timestamp }}

.github/workflows/reusable_build_image.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@ on:
33
workflow_call:
44
inputs:
55
product-name:
6+
description: The boil product directory name (e.g. "hadoop" or "precompiled/hadoop")
67
required: true
78
type: string
9+
image-name:
10+
description: |
11+
The image name used in the OCI registry. Defaults to product-name if not set.
12+
This is used when the boil directory is nested (eg: precompiled/hadoop) but
13+
the parent directory will be used as the namespace (eg: precompiled).
14+
default: ""
15+
type: string
816
sdp-version:
917
required: true
1018
type: string
@@ -112,10 +120,14 @@ jobs:
112120
image-registry-uri: oci.stackable.tech
113121
image-registry-username: robot$${{ inputs.registry-namespace }}+github-action-build
114122
image-registry-password: ${{ secrets.harbor-robot-secret }}
115-
image-repository: ${{ inputs.registry-namespace }}/${{ inputs.product-name }}
123+
# NOTE (@NickLarsenNZ): This fallback is just for now so we can support both repo level
124+
# image folders that go under the sdp namespace AND nested image folders that contain the
125+
# namespace (for example precommit/hadoop).
126+
# In future, we probably want to encode this information in the boil config metadata per
127+
# registry so we don't have to do such gymnastics in the workflow.
128+
image-repository: ${{ inputs.registry-namespace }}/${{ inputs.image-name || inputs.product-name }}
116129
image-manifest-tag: ${{ steps.build.outputs.image-manifest-tag }}
117130
source-image-uri: localhost/${{ inputs.registry-namespace }}/${{ inputs.product-name }}:${{ steps.build.outputs.image-manifest-tag }}
118-
119131
publish_manifests:
120132
name: Build/Publish ${{ matrix.versions }} Manifests
121133
needs: [generate_version_dimension, build]
@@ -139,7 +151,12 @@ jobs:
139151
image-registry-uri: oci.stackable.tech
140152
image-registry-username: robot$${{ inputs.registry-namespace }}+github-action-build
141153
image-registry-password: ${{ secrets.harbor-robot-secret }}
142-
image-repository: ${{ inputs.registry-namespace }}/${{ inputs.product-name }}
154+
# NOTE (@NickLarsenNZ): This fallback is just for now so we can support both repo level
155+
# image folders that go under the sdp namespace AND nested image folders that contain the
156+
# namespace (for example precommit/hadoop).
157+
# In future, we probably want to encode this information in the boil config metadata per
158+
# registry so we don't have to do such gymnastics in the workflow.
159+
image-repository: ${{ inputs.registry-namespace }}/${{ inputs.image-name || inputs.product-name }}
143160
image-index-manifest-tag: ${{ matrix.versions }}-stackable${{ inputs.sdp-version }}
144161

145162
notify:

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Added
88

9-
- hadoop: Add precompiled hadoop for later reuse in dependent images ([#1466]).
9+
- hadoop: Add precompiled hadoop for later reuse in dependent images ([#1466], [#1474]).
1010
- nifi: Add version `2.9.0` ([#1463]).
1111

1212
### Changed
@@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file.
2424
[#1454]: https://github.com/stackabletech/docker-images/pull/1454
2525
[#1463]: https://github.com/stackabletech/docker-images/pull/1463
2626
[#1466]: https://github.com/stackabletech/docker-images/pull/1466
27+
[#1474]: https://github.com/stackabletech/docker-images/pull/1474
2728

2829
## [26.3.0] - 2026-03-16
2930

0 commit comments

Comments
 (0)