Skip to content

Commit

Permalink
do not default docker compose file option to docker-compose.yml becau…
Browse files Browse the repository at this point in the history
…se there is docker compose has logic where it looks for the file in multiple places
  • Loading branch information
robwhitby committed Jul 29, 2024
1 parent 6ac7219 commit 9b52a4f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bin/run-cdc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ cd /scratch/consumer/${CONSUMER_PATH}
set +e

# run the tests with docker-compose
docker-compose -f ${DOCKER_COMPOSE_FILE:-docker-compose.yml} pull --quiet ${DOCKER_COMPOSE_SERVICE:-code}
COMPOSE_FILE_OPTION=""
if [[ -n "${DOCKER_COMPOSE_FILE:-}" ]]; then
COMPOSE_FILE_OPTION="-f ${DOCKER_COMPOSE_FILE}"
fi

docker-compose ${COMPOSE_FILE_OPTION} pull --quiet ${DOCKER_COMPOSE_SERVICE:-code}

echo running following docker-compose command:
echo docker-compose -f ${DOCKER_COMPOSE_FILE:-docker-compose.yml} run --no-deps \
echo docker-compose ${COMPOSE_FILE_OPTION} run --no-deps \
--entrypoint "${CONSUMER_SCRIPT}" \
-e DEPENDENCY_NAME=${PROVIDER_NAME} \
-e ${PROVIDER_HOST_KEY}=${PROVIDER_HOST} \
Expand All @@ -67,7 +72,7 @@ echo docker-compose -f ${DOCKER_COMPOSE_FILE:-docker-compose.yml} run --no-deps
${VOLUME_OPTIONS:-} \
${DOCKER_COMPOSE_SERVICE:-code}

docker-compose -f ${DOCKER_COMPOSE_FILE:-docker-compose.yml} run --no-deps \
docker-compose ${COMPOSE_FILE_OPTION} run --no-deps \
--entrypoint "${CONSUMER_SCRIPT}" \
-e DEPENDENCY_NAME=${PROVIDER_NAME} \
-e ${PROVIDER_HOST_KEY}=${PROVIDER_HOST} \
Expand Down

0 comments on commit 9b52a4f

Please sign in to comment.