Compare commits

...

2 Commits
1.1.0 ... 1.1.1

Author SHA1 Message Date
Jose Diaz-Gonzalez
30c4905d71 Release 1.1.1 2018-04-23 06:56:41 -04:00
Jose Diaz-Gonzalez
94221b71ce refactor: allow usage of the same variable to disable docker pulls 2018-04-23 06:56:41 -04:00
4 changed files with 7 additions and 5 deletions

2
config
View File

@@ -11,6 +11,8 @@ export PLUGIN_DATA_HOST_ROOT=$MYSQL_HOST_ROOT
export PLUGIN_DATASTORE_PORTS=(3306)
export PLUGIN_DATASTORE_WAIT_PORT=3306
export PLUGIN_DEFAULT_ALIAS="DATABASE"
export PLUGIN_DISABLE_PULL=${MYSQL_DISABLE_PULL:=}
export PLUGIN_DISABLE_PULL_VARIABLE="MYSQL_DISABLE_PULL"
export PLUGIN_ALT_ALIAS="DOKKU_MYSQL"
export PLUGIN_IMAGE=$MYSQL_IMAGE
export PLUGIN_IMAGE_VERSION=$MYSQL_IMAGE_VERSION

View File

@@ -30,8 +30,8 @@ service_create() {
service_parse_args "${@:2}"
if ! docker images | grep -e "^$PLUGIN_IMAGE " | grep -q " $PLUGIN_IMAGE_VERSION " ; then
if [[ "$MYSQL_DISABLE_PULL" == "true" ]]; then
dokku_log_warn "MYSQL_DISABLE_PULL environment variable detected. Not running pull command." 1>&2
if [[ "$PLUGIN_DISABLE_PULL" == "true" ]]; then
dokku_log_warn "${PLUGIN_DISABLE_PULL_VARIABLE} environment variable detected. Not running pull command." 1>&2
dokku_log_warn " docker pull ${IMAGE}" 1>&2
dokku_log_warn "$PLUGIN_SERVICE service creation failed"
exit 1

View File

@@ -5,8 +5,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
plugin-install() {
pull-docker-image() {
declare IMAGE="$1"
if [[ "$MYSQL_DISABLE_PULL" == "true" ]]; then
echo " ! MYSQL_DISABLE_PULL environment variable detected. Not running pull command." 1>&2
if [[ "$PLUGIN_DISABLE_PULL" == "true" ]]; then
echo " ! ${PLUGIN_DISABLE_PULL_VARIABLE} environment variable detected. Not running pull command." 1>&2
echo " ! docker pull ${IMAGE}" 1>&2
return
fi

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku mysql service plugin"
version = "1.1.0"
version = "1.1.1"
[plugin.config]