aboutsummaryrefslogtreecommitdiffstats
path: root/deploy.sh
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2017-03-08 11:40:51 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2017-03-08 11:40:51 -0500
commitc1570953a15c7ceb378c0fad9965fa41b17ebae4 (patch)
tree645ef0f84e93d60c6d1f32dd04a86351613d70d7 /deploy.sh
parentd060f724701f52105e61fb596eaa780e738a25d8 (diff)
Add the ability to call deploy.sh without params
By default, deploy.sh is expecting Nexus related params to pull the images from there. But while developing locally, one would want to use the local images, hence wouldn't pass any args. Change-Id: Ia9866e7dcb854561c6950da8c9cb69d758477457 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/deploy.sh b/deploy.sh
index a7d7c37..698c92b 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -18,7 +18,11 @@
################################### Functions definition ################################
-if [ "$#" -ne 6 ]; then
+if [ "$#" = 0 ]; then
+ echo "Deploying with local images, not pulling them from Nexus."
+ NO_NEXUS=true
+fi
+if [ "$#" -ne 6 ] & [ ! $NO_NEXUS ]; then
echo "Usage: deploy.sh <NEXUS_HOST_MSO:NEXUS_PORT_MSO> <NEXUS_LOGIN_MSO> <NEXUS_PASSWORD_MSO> <NEXUS_HOST_MARIADB:NEXUS_PORT_MARIADB> <NEXUS_LOGIN_MARIADB> <NEXUS_PASSWORD_MARIADB>
- env DOCKER_HOST (optional)
sets the docker host to be used if not local unix socket
@@ -33,7 +37,7 @@ if [ "$#" -ne 6 ]; then
exit 1
fi
-if [ -z "$MSO_DOCKER_IMAGE_VERSION" ]; then
+if [ -z "$MSO_DOCKER_IMAGE_VERSION" ] & [ ! $NO_NEXUS ]; then
echo "Env variable MSO_DOCKER_IMAGE_VERSION must be SET to a version before running this script"
exit 1
fi
@@ -127,7 +131,9 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
init_docker_command
update_json_config
-pull_docker_images
+if [ ! $NO_NEXUS ]; then
+ pull_docker_images
+fi
# don't remove the containers,no cleanup
#$DOCKER_COMPOSE_CMD stop