From 63f38499922c813edf371a5d13b1bbe6f0458b38 Mon Sep 17 00:00:00 2001 From: cavemandaveman Date: Tue, 11 May 2021 14:49:42 -0500 Subject: [PATCH] NIFIREG-453 Add ability to set DatabaseFlowPersistenceProvider in Docker --- .../dockermaven/sh/update_flow_provider.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nifi-registry-docker-maven/dockermaven/sh/update_flow_provider.sh b/nifi-registry-docker-maven/dockermaven/sh/update_flow_provider.sh index c903323e8..53d2afdcd 100644 --- a/nifi-registry-docker-maven/dockermaven/sh/update_flow_provider.sh +++ b/nifi-registry-docker-maven/dockermaven/sh/update_flow_provider.sh @@ -29,16 +29,19 @@ add_property() { fi } -xmlstarlet ed --inplace -u "${property_xpath}/property[@name='Flow Storage Directory']" -v "${NIFI_REGISTRY_FLOW_STORAGE_DIR:-./flow_storage}" "${providers_file}" - case ${NIFI_REGISTRY_FLOW_PROVIDER} in file) + xmlstarlet ed --inplace -u "${property_xpath}/property[@name='Flow Storage Directory']" -v "${NIFI_REGISTRY_FLOW_STORAGE_DIR:-./flow_storage}" "${providers_file}" xmlstarlet ed --inplace -u "${property_xpath}/class" -v "org.apache.nifi.registry.provider.flow.FileSystemFlowPersistenceProvider" "${providers_file}" ;; git) + xmlstarlet ed --inplace -u "${property_xpath}/property[@name='Flow Storage Directory']" -v "${NIFI_REGISTRY_FLOW_STORAGE_DIR:-./flow_storage}" "${providers_file}" xmlstarlet ed --inplace -u "${property_xpath}/class" -v "org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider" "${providers_file}" add_property "Remote To Push" "${NIFI_REGISTRY_GIT_REMOTE:-}" add_property "Remote Access User" "${NIFI_REGISTRY_GIT_USER:-}" add_property "Remote Access Password" "${NIFI_REGISTRY_GIT_PASSWORD:-}" ;; + database) + xmlstarlet ed --inplace -u "${property_xpath}/class" -v "org.apache.nifi.registry.provider.flow.DatabaseFlowPersistenceProvider" "${providers_file}" + ;; esac