@@ -63,6 +63,47 @@ rm -rf /stackable/nifi-${PRODUCT}/docs
63
63
chmod -R g=u /stackable
64
64
EOF
65
65
66
+ FROM stackable/image/java-devel AS nifi-iceberg-bundle-builder
67
+
68
+ ARG NIFI_ICEBERG_BUNDLE
69
+ ARG PRODUCT
70
+ ARG STACKABLE_USER_UID
71
+
72
+ USER ${STACKABLE_USER_UID}
73
+ WORKDIR /build
74
+
75
+ RUN <<EOF
76
+ mkdir -p /stackable
77
+
78
+ # NiFI 1.x natively supports Iceberg, no need to build an iceberg-bundle for it
79
+ if [[ "${PRODUCT}" != 1.* ]] ; then
80
+ curl "https://github.com/stackabletech/nifi-iceberg-bundle/archive/refs/tags/${NIFI_ICEBERG_BUNDLE}.tar.gz" | tar -xzC .
81
+ cd nifi-iceberg-bundle-${NIFI_ICEBERG_BUNDLE} || exit
82
+
83
+ mvn \
84
+ --batch-mode \
85
+ --no-transfer-progress\
86
+ clean package \
87
+ -D nifi.version=${PRODUCT} \
88
+ -Dmaven.javadoc.skip=true \
89
+ -Denforcer.skip=true
90
+ # We need "-Denforcer.skip=true", as the Maven version is too old
91
+
92
+ cp ./nifi-iceberg-services-api-nar/target/nifi-iceberg-services-api-nar-${NIFI_ICEBERG_BUNDLE}.nar /stackable
93
+ cp ./nifi-iceberg-services-nar/target/nifi-iceberg-services-nar-${NIFI_ICEBERG_BUNDLE}.nar /stackable
94
+ cp ./nifi-iceberg-processors-nar/target/nifi-iceberg-processors-nar-${NIFI_ICEBERG_BUNDLE}.nar /stackable
95
+ cp ./target/bom.json /stackable/nifi-iceberg-bundle.sbom.json
96
+
97
+ cd ..
98
+ # Save disk space, even for intermediate images
99
+ rm -rf nifi-iceberg-bundle-main
100
+
101
+ # Set correct groups
102
+ chmod g=u /stackable/*.nar
103
+ chmod g=u /stackable/*.sbom.json
104
+ fi
105
+ EOF
106
+
66
107
FROM stackable/image/java-base AS final
67
108
68
109
ARG PRODUCT
@@ -79,6 +120,8 @@ LABEL name="Apache NiFi" \
79
120
80
121
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/
81
122
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar
123
+ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.nar /stackable/nifi-${PRODUCT}/lib/
124
+ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.sbom.json /stackable/nifi-${PRODUCT}/lib/
82
125
83
126
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
84
127
COPY --chown=${STACKABLE_USER_UID}:0 nifi/licenses /licenses
0 commit comments