Skip to content

Commit

Permalink
Script checks path existance before copying
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxFrax committed Jul 4, 2019
1 parent 75e727b commit 43f26fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/docker/launch_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ git clean -f -d
git pull

# Sets up the credentials file
cp "${CREDENTIALS_PATH}" "${DOCKER_SHARED_FOLDER}/credentials.json"
if [[ -f "$CREDENTIALS_PATH" ]]; then
cp "${CREDENTIALS_PATH}" "${DOCKER_SHARED_FOLDER}/credentials.json"
fi

# Builds and runs docker
docker build --rm -f "Dockerfile.pipeline" -t maxfrax/soweego:pipeline .
Expand Down
4 changes: 3 additions & 1 deletion scripts/docker/launch_prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ while getopts :s:c: o; do
done
shift "$((OPTIND - 1))"

cp "${CREDENTIALS_PATH}" "${DOCKER_SHARED_FOLDER}/credentials.json"
if [[ -f "$CREDENTIALS_PATH" ]]; then
cp "${CREDENTIALS_PATH}" "${DOCKER_SHARED_FOLDER}/credentials.json"
fi


docker build --rm -f "Dockerfile.test" -t maxfrax/soweego:latest .
Expand Down
4 changes: 3 additions & 1 deletion scripts/docker/launch_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ while getopts :s:c: o; do
done
shift "$((OPTIND - 1))"

cp "${CREDENTIALS_PATH}" "${DOCKER_SHARED_FOLDER}/credentials.json"
if [[ -f "$CREDENTIALS_PATH" ]]; then
cp "${CREDENTIALS_PATH}" "${DOCKER_SHARED_FOLDER}/credentials.json"
fi

docker-compose -f "docker-compose.dev.yml" up -d --build
docker-compose -f "docker-compose.dev.yml" exec soweego /bin/bash

0 comments on commit 43f26fb

Please sign in to comment.