diff options
Diffstat (limited to 'policy-db-migrator')
-rw-r--r-- | policy-db-migrator/pom.xml | 2 | ||||
-rw-r--r-- | policy-db-migrator/src/main/docker/Dockerfile | 2 | ||||
-rwxr-xr-x | policy-db-migrator/src/main/docker/db-migrator | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/policy-db-migrator/pom.xml b/policy-db-migrator/pom.xml index b9c9ab4b..83d18c90 100644 --- a/policy-db-migrator/pom.xml +++ b/policy-db-migrator/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.policy.docker</groupId> <artifactId>docker</artifactId> - <version>2.5.0-SNAPSHOT</version> + <version>2.5.1-SNAPSHOT</version> </parent> <artifactId>policy-db-migrator</artifactId> diff --git a/policy-db-migrator/src/main/docker/Dockerfile b/policy-db-migrator/src/main/docker/Dockerfile index 1860b060..f125088d 100644 --- a/policy-db-migrator/src/main/docker/Dockerfile +++ b/policy-db-migrator/src/main/docker/Dockerfile @@ -18,7 +18,7 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= #------------------------------------------------------------------------------- -FROM onap/policy-jdk-alpine:2.5.0 +FROM onap/policy-jdk-alpine:2.5.1-SNAPSHOT LABEL maintainer="Policy Team" LABEL org.opencontainers.image.title="Policy db-migrator" diff --git a/policy-db-migrator/src/main/docker/db-migrator b/policy-db-migrator/src/main/docker/db-migrator index 565ff1c4..3a4ccfa0 100755 --- a/policy-db-migrator/src/main/docker/db-migrator +++ b/policy-db-migrator/src/main/docker/db-migrator @@ -621,7 +621,11 @@ if [ -z "${SQL_HOST}" ] || [ -z "${SQL_USER}" ] || [ -z "${SQL_PASSWORD}" ]; the exit 4 fi -MYSQL="mysql -u${SQL_USER} -p${SQL_PASSWORD} -h ${SQL_HOST}" +if [ -z "$MYSQL_CMD" ]; then + MYSQL_CMD="mysql" +fi + +MYSQL="${MYSQL_CMD} -u${SQL_USER} -p${SQL_PASSWORD} -h ${SQL_HOST}" if ! ${MYSQL} -h"${SQL_HOST}" --execute "show databases;" >/dev/null 2>&1; then echo "error: No DB connectivity to ${SQL_HOST} for ${SQL_USER}" exit 5 |