@@ -97,7 +97,7 @@ mkdir -p /stackable
9797
9898# NiFI 1.x natively supports Iceberg, no need to build an iceberg-bundle for it
9999if [[ "${PRODUCT}" != 1.* ]] ; then
100- curl "https://github.com/stackabletech/nifi-iceberg-bundle/archive/refs/tags/${NIFI_ICEBERG_BUNDLE}.tar.gz" | tar -xzC .
100+ curl -L "https://github.com/stackabletech/nifi-iceberg-bundle/archive/refs/tags/${NIFI_ICEBERG_BUNDLE}.tar.gz" | tar -xzC .
101101 cd nifi-iceberg-bundle-${NIFI_ICEBERG_BUNDLE} || exit
102102
103103 sed -i -e "s/{{ NIFI_VERSION }}/${PRODUCT}/g" pom.xml
@@ -126,6 +126,35 @@ chmod g=u /stackable/*.cdx.json
126126fi
127127EOF
128128
129+ FROM stackable/image/java-devel AS opa-authorizer-builder
130+
131+ ARG NIFI_OPA_AUTHORIZER_PLUGIN
132+ ARG STACKABLE_USER_UID
133+ ARG PRODUCT
134+
135+ USER ${STACKABLE_USER_UID}
136+ WORKDIR /build
137+
138+ RUN <<EOF
139+ mkdir -p /stackable
140+
141+ curl -L "https://github.com/DavidGitter/nifi-opa-plugin/archive/refs/tags/v${NIFI_OPA_AUTHORIZER_PLUGIN}.tar.gz" | tar -xzC .
142+ cd nifi-opa-plugin-${NIFI_OPA_AUTHORIZER_PLUGIN}/authorizer || exit
143+
144+ mvn \
145+ --batch-mode \
146+ --no-transfer-progress \
147+ clean package \
148+ -DskipTests \
149+ -Pnifi-${PRODUCT}
150+
151+ cp ./target/opa-authorizer.nar /stackable/opa-authorizer.nar
152+ cp ../LICENSE /stackable/LICENSE
153+
154+ # Set correct permissions
155+ chmod g=u /stackable/opa-authorizer.nar
156+ EOF
157+
129158FROM stackable/image/java-base AS final
130159
131160ARG PRODUCT
@@ -146,6 +175,8 @@ COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackab
146175COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.cdx.json /stackable/nifi-${PRODUCT}/lib/
147176COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/git-sync /stackable/git-sync
148177
178+ COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/opa-authorizer.nar /stackable/nifi-${PRODUCT}/extensions/opa-authorizer.nar
179+ COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/LICENSE /licenses/NIFI_OPA_PLUGIN_LICENSE
149180COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
150181COPY --chown=${STACKABLE_USER_UID}:0 nifi/licenses /licenses
151182COPY --chown=${STACKABLE_USER_UID}:0 nifi/python /stackable/python
0 commit comments