Skip to content

Commit 5260de0

Browse files
committed
Revert "feat: custom version for NiFi (#1172)"
This reverts commit a187657.
1 parent bd6b3a6 commit 5260de0

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ All notable changes to this project will be documented in this file.
139139
- nifi: Remove `2.2.0` ([#1114]).
140140
- kafka: Remove `3.7.1` and `3.8.0` ([#1117]).
141141
- spark-connect-client: Remove `3.5.5` ([#1142]).
142-
- nifi: Enable custom versions ([#1172]).
143142
- kafka: Enable custom versions ([#1171]).
144143
- omid: Enable custom versions ([#1174]).
145144

nifi/Dockerfile

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ FROM oci.stackable.tech/sdp/git-sync/git-sync:${GIT_SYNC} AS git-sync-image
88
FROM stackable/image/java-devel AS nifi-builder
99

1010
ARG PRODUCT
11-
ARG RELEASE
1211
ARG MAVEN_VERSION="3.9.8"
1312
ARG STACKABLE_USER_UID
1413

@@ -46,13 +45,8 @@ curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bc
4645

4746
cd "$(/stackable/patchable --images-repo-root=src checkout nifi ${PRODUCT})"
4847

49-
ORIGINAL_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
50-
NEW_VERSION="${PRODUCT}-stackable${RELEASE}"
51-
52-
mvn versions:set -DnewVersion=$NEW_VERSION
53-
5448
# Create snapshot of the source code including custom patches
55-
tar -czf /stackable/nifi-${NEW_VERSION}-src.tar.gz .
49+
tar -czf /stackable/nifi-${PRODUCT}-src.tar.gz .
5650

5751
# NOTE: Since NiFi 2.0.0 PutIceberg Processor and services were removed, so including the `include-iceberg` profile does nothing.
5852
# Additionally some modules were moved to optional build profiles, so we need to add `include-hadoop` to get `nifi-parquet-nar` for example.
@@ -63,14 +57,13 @@ else
6357
fi
6458

6559
# Copy the binaries to the /stackable folder
66-
mv nifi-assembly/target/nifi-${NEW_VERSION}-bin/nifi-${NEW_VERSION} /stackable/nifi-${NEW_VERSION}
60+
mv nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}
6761

6862
# Copy the SBOM as well
69-
sed -i "s/${NEW_VERSION}/${ORIGINAL_VERSION}/g" nifi-assembly/target/bom.json
70-
mv nifi-assembly/target/bom.json /stackable/nifi-${NEW_VERSION}/nifi-${NEW_VERSION}.cdx.json
63+
mv nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json
7164

7265
# Get a list of NARs
73-
export NARS=$(ls /stackable/nifi-${NEW_VERSION}/lib/*.nar | awk -F '/' '{ print $5 }' | sed "s/\-${NEW_VERSION}.nar\$//g")
66+
export NARS=$(ls /stackable/nifi-${PRODUCT}/lib/*.nar | awk -F '/' '{ print $5 }' | sed "s/\-${PRODUCT}.nar\$//g")
7467
# Get a list of SBOMs
7568
find . -name bom.json > bomlist.txt
7669

@@ -79,15 +72,15 @@ for nar in $NARS; do
7972
match=$(grep "\/$nar\/target\/bom.json" bomlist.txt || true)
8073
if [[ -n "$match" ]]; then
8174
# Copy the SBOM of the NAR
82-
cp "$match" "/stackable/nifi-${NEW_VERSION}/$nar.cdx.json"
75+
cp "$match" "/stackable/nifi-${PRODUCT}/$nar.cdx.json"
8376
fi
8477
done
8578

8679
# Remove sources
8780
(cd .. && rm -r ${PRODUCT})
8881

8982
# Remove generated docs in binary
90-
rm -rf /stackable/nifi-${NEW_VERSION}/docs
83+
rm -rf /stackable/nifi-${PRODUCT}/docs
9184

9285
# Set correct permissions
9386
chmod -R g=u /stackable
@@ -189,15 +182,15 @@ LABEL name="Apache NiFi" \
189182
summary="The Stackable image for Apache NiFi." \
190183
description="This image is deployed by the Stackable Operator for Apache NiFi."
191184

192-
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT}-stackable${RELEASE} /stackable/nifi-${PRODUCT}-stackable${RELEASE}/
193-
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT}-stackable${RELEASE}-src.tar.gz /stackable
185+
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/
186+
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT}-src.tar.gz /stackable
194187
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar
195-
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.nar /stackable/nifi-${PRODUCT}-stackable${RELEASE}/lib/
196-
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.cdx.json /stackable/nifi-${PRODUCT}-stackable${RELEASE}/lib/
188+
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.nar /stackable/nifi-${PRODUCT}/lib/
189+
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*.cdx.json /stackable/nifi-${PRODUCT}/lib/
197190
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-iceberg-bundle-builder /stackable/*-src.tar.gz /stackable
198191
COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/git-sync /stackable/git-sync
199192

200-
COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/opa-authorizer.nar /stackable/nifi-${PRODUCT}-stackable${RELEASE}/extensions/opa-authorizer.nar
193+
COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/opa-authorizer.nar /stackable/nifi-${PRODUCT}/extensions/opa-authorizer.nar
201194
COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/nifi-opa-plugin-${NIFI_OPA_AUTHORIZER_PLUGIN}-src.tar.gz /stackable
202195
COPY --chown=${STACKABLE_USER_UID}:0 --from=opa-authorizer-builder /stackable/LICENSE /licenses/NIFI_OPA_PLUGIN_LICENSE
203196
COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/bin /stackable/bin
@@ -226,13 +219,13 @@ pip install --no-cache-dir \
226219
# This can be removed once older versions / operators using this are no longer supported
227220
ln -s /stackable/stackable-bcrypt.jar /bin/stackable-bcrypt.jar
228221

229-
ln -s /stackable/nifi-${PRODUCT}-stackable${RELEASE} /stackable/nifi
222+
ln -s /stackable/nifi-${PRODUCT} /stackable/nifi
230223

231224
# fix missing permissions / ownership
232225
chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/nifi
233226
chmod --recursive g=u /stackable/python
234227
chmod --recursive g=u /stackable/bin
235-
chmod g=u /stackable/nifi-${PRODUCT}-stackable${RELEASE}
228+
chmod g=u /stackable/nifi-${PRODUCT}
236229
chmod g=u /stackable/*-src.tar.gz
237230
EOF
238231

0 commit comments

Comments
 (0)