Skip to content

Commit db68820

Browse files
authored
Merge branch 'main' into feat/modularize-dockerfiles
2 parents c3931e1 + 91545e5 commit db68820

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ All notable changes to this project will be documented in this file.
5757
- cyclonedx-bom: Bump airflow and superset to use `6.0.0` ([#1090]).
5858
- vector: Bump to `0.46.1` ([#1098]).
5959
- spark: update dependencies for 3.5.5 ([#1094])
60+
- nifi: include NAR SBOMs ([#1119])
6061

6162
### Fixed
6263

@@ -128,6 +129,7 @@ All notable changes to this project will be documented in this file.
128129
[#1110]: https://github.com/stackabletech/docker-images/pull/1110
129130
[#1114]: https://github.com/stackabletech/docker-images/pull/1114
130131
[#1116]: https://github.com/stackabletech/docker-images/pull/1116
132+
[#1119]: https://github.com/stackabletech/docker-images/pull/1119
131133

132134
## [25.3.0] - 2025-03-21
133135

nifi/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ mv nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PR
6161
# Copy the SBOM as well
6262
mv nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json
6363

64+
# Get a list of NARs
65+
export NARS=$(ls /stackable/nifi-${PRODUCT}/lib/*.nar | awk -F '/' '{ print $5 }' | sed "s/\-${PRODUCT}.nar\$//g")
66+
# Get a list of SBOMs
67+
find . -name bom.json > bomlist.txt
68+
69+
for nar in $NARS; do
70+
# Try to find the NAR in the list of SBOMs
71+
match=$(grep "\/$nar\/target\/bom.json" bomlist.txt || true)
72+
if [[ -n "$match" ]]; then
73+
# Copy the SBOM of the NAR
74+
cp "$match" "/stackable/nifi-${PRODUCT}/$nar.cdx.json"
75+
fi
76+
done
77+
6478
# Remove sources
6579
(cd .. && rm -r ${PRODUCT})
6680

@@ -89,6 +103,7 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODU
89103
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar
90104
COPY --chown=${STACKABLE_USER_UID}:0 --from=iceberg-bundle-builder /stackable/*.nar /stackable/nifi-${PRODUCT}/lib/
91105
COPY --chown=${STACKABLE_USER_UID}:0 --from=iceberg-bundle-builder /stackable/*.sbom.json /stackable/nifi-${PRODUCT}/lib/
106+
92107
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/git-sync /stackable/git-sync
93108

94109
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin

0 commit comments

Comments
 (0)