This is an automated email from the ASF dual-hosted git repository.

bbende pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-registry.git


The following commit(s) were added to refs/heads/main by this push:
     new 541a362  NIFI-8013 Add env var to set remote repo in git persistence 
(#313)
541a362 is described below

commit 541a362ff358c366c20d11a07d514ac1cce0c061
Author: Chamila <[email protected]>
AuthorDate: Wed Nov 18 05:05:16 2020 +1300

    NIFI-8013 Add env var to set remote repo in git persistence (#313)
    
    This commit adds an environment variable NIFI_REGISTRY_GIT_REPO so that
    the relevant configuration can be set when using the Docker image from
    DockerHub.
    
    The configuration is set only if the environment variable is set and not
    empty since it's not a mandatory value to be set for the Registry to
    operate.
---
 nifi-registry-core/nifi-registry-docker/dockerhub/README.md           | 1 +
 .../nifi-registry-docker/dockerhub/sh/update_flow_provider.sh         | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/nifi-registry-core/nifi-registry-docker/dockerhub/README.md 
b/nifi-registry-core/nifi-registry-docker/dockerhub/README.md
index d3489ee..5788242 100644
--- a/nifi-registry-core/nifi-registry-docker/dockerhub/README.md
+++ b/nifi-registry-core/nifi-registry-docker/dockerhub/README.md
@@ -151,6 +151,7 @@ The following, optional environment variables may be added 
to configure flow per
 | NIFI_REGISTRY_GIT_REMOTE       | Remote to Push                       |
 | NIFI_REGISTRY_GIT_USER         | Remote Access User                   |
 | NIFI_REGISTRY_GIT_PASSWORD     | Remote Access Password               |
+| NIFI_REGISTRY_GIT_REPO         | Remote Clone Repository              |
 
 #### Extension Bundle Persistence Configuration
 
diff --git 
a/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh 
b/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
index c903323..92a9214 100644
--- 
a/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
+++ 
b/nifi-registry-core/nifi-registry-docker/dockerhub/sh/update_flow_provider.sh
@@ -40,5 +40,9 @@ case ${NIFI_REGISTRY_FLOW_PROVIDER} in
         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:-}"
+
+       if [ ! -z "$NIFI_REGISTRY_GIT_REPO" ]; then
+               add_property "Remote Clone Repository" 
"${NIFI_REGISTRY_GIT_REPO:-}"
+       fi
         ;;
 esac

Reply via email to