@@ -59,6 +59,20 @@ mv nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PR
59
59
# Copy the SBOM as well
60
60
mv nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json
61
61
62
+ # Get a list of NARs
63
+ export NARS=$(ls /stackable/nifi-${PRODUCT}/lib/*.nar | awk -F '/' '{ print $5 }' | sed "s/\- ${PRODUCT}.nar\$ //g" )
64
+ # Get a list of SBOMs
65
+ find . -name bom.json > bomlist.txt
66
+
67
+ for nar in $NARS; do
68
+ # Try to find the NAR in the list of SBOMs
69
+ match=$(grep "\/ $nar\/ target\/ bom.json" bomlist.txt || true)
70
+ if [[ -n "$match" ]]; then
71
+ # Copy the SBOM of the NAR
72
+ cp "$match" "/stackable/nifi-${PRODUCT}/$nar.cdx.json"
73
+ fi
74
+ done
75
+
62
76
# Remove sources
63
77
(cd .. && rm -r ${PRODUCT})
64
78
@@ -100,15 +114,15 @@ if [[ "${PRODUCT}" != 1.* ]] ; then
100
114
cp ./nifi-iceberg-services-api-nar/target/nifi-iceberg-services-api-nar-${NIFI_ICEBERG_BUNDLE}.nar /stackable
101
115
cp ./nifi-iceberg-services-nar/target/nifi-iceberg-services-nar-${NIFI_ICEBERG_BUNDLE}.nar /stackable
102
116
cp ./nifi-iceberg-processors-nar/target/nifi-iceberg-processors-nar-${NIFI_ICEBERG_BUNDLE}.nar /stackable
103
- cp ./target/bom.json /stackable/nifi-iceberg-bundle.sbom .json
117
+ cp ./target/bom.json /stackable/nifi-iceberg-bundle.cdx .json
104
118
105
119
cd ..
106
120
# Save disk space, even for intermediate images
107
121
rm -rf nifi-iceberg-bundle-${NIFI_ICEBERG_BUNDLE}
108
122
109
123
# Set correct groups
110
124
chmod g=u /stackable/*.nar
111
- chmod g=u /stackable/*.sbom .json
125
+ chmod g=u /stackable/*.cdx .json
112
126
fi
113
127
EOF
114
128
@@ -129,7 +143,7 @@ LABEL name="Apache NiFi" \
129
143
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/
130
144
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar
131
145
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.nar /stackable/nifi-${PRODUCT}/lib/
132
- COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.sbom .json /stackable/nifi-${PRODUCT}/lib/
146
+ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.cdx .json /stackable/nifi-${PRODUCT}/lib/
133
147
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/git-sync /stackable/git-sync
134
148
135
149
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
0 commit comments