Skip to content

Commit

Permalink
Refactor ping mysql to a Makefile target (CodelyTV#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikybars authored Feb 11, 2020
1 parent 3db5fff commit 565f69f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- name: Wait for the environment to get up
run: |
while ! docker exec codelytv-java_ddd_skeleton-mysql mysqladmin --user=root --password= --host "127.0.0.1" ping --silent &> /dev/null ; do
while ! make ping-mysql &>/dev/null; do
echo "Waiting for database connection..."
sleep 2
done
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PONY: all build test
.PHONY: all build test ping-mysql

all: build

Expand All @@ -16,6 +16,9 @@ test:

run:
@./gradlew :run

ping-mysql:
@docker exec codelytv-java_ddd_skeleton-mysql mysqladmin --user=root --password= --host "127.0.0.1" ping --silent

# Start the app
start-mooc_backend:
Expand Down

0 comments on commit 565f69f

Please sign in to comment.