This is an automated email from the ASF dual-hosted git repository.
pvillard31 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 8c5198e8d9d NIFI-8812 Updated Docker script to replace existing XML
properties (#11490)
8c5198e8d9d is described below
commit 8c5198e8d9dfdb593e0b1dafbcf9168d22f4b864
Author: David Handermann <[email protected]>
AuthorDate: Thu Jul 30 02:25:53 2026 -0500
NIFI-8812 Updated Docker script to replace existing XML properties (#11490)
Co-authored-by: Febriyansyah <[email protected]>
---
.../nifi-registry-docker/dockerhub/sh/update_flow_provider.sh | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git
a/nifi-registry/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
b/nifi-registry/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
index 87fa5bdf725..9fa8964a9bd 100644
---
a/nifi-registry/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
+++
b/nifi-registry/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
@@ -23,9 +23,13 @@ add_property() {
property_value=$2
if [ -n "${property_value}" ]; then
- xmlstarlet ed --inplace --subnode "${property_xpath}" --type elem -n
property -v "${property_value}" \
- -i \$prev --type attr -n name -v "${property_name}" \
- "${providers_file}"
+ if xmlstarlet sel -Q -t -c
"${property_xpath}/property[@name='${property_name}']" "${providers_file}"; then
+ xmlstarlet ed --inplace -u
"${property_xpath}/property[@name='${property_name}']" -v "${property_value}"
"${providers_file}"
+ else
+ xmlstarlet ed --inplace --subnode "${property_xpath}" --type elem -n
property -v "${property_value}" \
+ -i \$prev --type attr -n name -v "${property_name}" \
+ "${providers_file}"
+ fi
fi
}