Skip to content

Commit b337fb4

Browse files
authored
feat(nifi): Add nifi-iceberg-bundle (#1060)
* feat(nifi): Add nifi-iceberg-bundle * changelog * Add SBOM to final image * Use version 0.0.1 * hadolint * Bump to 0.0.2 * Bump to 0.0.3
1 parent 3384aaa commit b337fb4

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ All notable changes to this project will be documented in this file.
3333
`check-permissions-ownership.sh` provided in stackable-base image ([#1025]).
3434
- zookeeper: check for correct permissions and ownerships in /stackable folder via
3535
`check-permissions-ownership.sh` provided in stackable-base image ([#1043]).
36+
- nifi: Add [nifi-iceberg-bundle](https://github.com/stackabletech/nifi-iceberg-bundle) for NiFi `2.2.0` ([#1060]).
3637
- java: Add JDK 24 ([#1097]).
3738
- ci: Add golang image to mirror workflow ([#1103]).
3839

@@ -92,6 +93,7 @@ All notable changes to this project will be documented in this file.
9293
[#1054]: https://github.com/stackabletech/docker-images/pull/1054
9394
[#1055]: https://github.com/stackabletech/docker-images/pull/1055
9495
[#1056]: https://github.com/stackabletech/docker-images/pull/1056
96+
[#1060]: https://github.com/stackabletech/docker-images/pull/1060
9597
[#1090]: https://github.com/stackabletech/docker-images/pull/1090
9698
[#1091]: https://github.com/stackabletech/docker-images/pull/1091
9799
[#1093]: https://github.com/stackabletech/docker-images/pull/1093

nifi/Dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,47 @@ rm -rf /stackable/nifi-${PRODUCT}/docs
6363
chmod -R g=u /stackable
6464
EOF
6565

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+
66107
FROM stackable/image/java-base AS final
67108

68109
ARG PRODUCT
@@ -79,6 +120,8 @@ LABEL name="Apache NiFi" \
79120

80121
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/
81122
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/
82125

83126
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
84127
COPY --chown=${STACKABLE_USER_UID}:0 nifi/licenses /licenses

nifi/versions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"product": "2.2.0",
1414
"java-base": "21",
1515
"java-devel": "21",
16+
"nifi_iceberg_bundle": "0.0.3",
1617
},
1718
]

0 commit comments

Comments
 (0)