Plugins: Support installing to folders with whitespace and fix pluginUrl trailing and leading whitespace failures (#32506)

* Plugins: Support installing to folders with whitespace and fix pluginUrl trailing and leading whitespace failures

* update docs

* update docs
This commit is contained in:
Will Browne
2021-04-27 16:30:59 +02:00
committed by GitHub
parent e6f9f65fdf
commit 6958340b24
4 changed files with 9 additions and 9 deletions

View File

@@ -42,8 +42,8 @@ RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
IFS=$OLDIFS; \
if expr match "$plugin" '.*\;.*'; then \
pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2); \
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}; \
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
else \
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
fi \

View File

@@ -46,8 +46,8 @@ RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
IFS=$OLDIFS; \
if expr match "$plugin" '.*\;.*'; then \
pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2); \
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}; \
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
else \
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
fi \

View File

@@ -69,8 +69,8 @@ if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then
IFS=$OLDIFS
if [[ $plugin =~ .*\;.* ]]; then
pluginUrl=$(echo "$plugin" | cut -d';' -f 1)
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2)
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2)
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"
else
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}
fi