Skip to content

Commit 87dadb3

Browse files
authored
Hr/ch34492/waitonconsul (#39)
* add step to wait on Consul
1 parent f533573 commit 87dadb3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.circleci/config.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
sudo apt-get -q update &&
8585
sudo apt-cache policy docker-ce &&
8686
sudo apt-get -qy install docker-ce
87-
- run: sudo apt-get -qy install redis-server
87+
- run: sudo apt-get -qy install redis-server curl
8888
- checkout
8989
- run:
9090
name: validate composer.json
@@ -109,6 +109,13 @@ jobs:
109109
name: start Consul
110110
command: ./consul agent -dev
111111
background: true
112+
- run:
113+
name: wait on Consul
114+
command: |
115+
until $(curl --output /dev/null --silent --fail --request PUT --data 'test' http://localhost:8500/v1/kv/initchecker); do
116+
echo 'still waiting on Consul...'; sleep 2;
117+
done
118+
timeout: 50
112119
- run:
113120
name: run tests
114121
command: vendor/bin/phpunit --log-junit ~/phpunit/junit.xml --coverage-text tests

0 commit comments

Comments
 (0)