Skip to content

Commit cc66b19

Browse files
authored
Fix flaky sentinel service (oliver006#527)
* try 'detach: true' for redis-sentinel and start after a delay * update sentinel image to 6.2-debian-10 * sleep 10 * add comment
1 parent a751436 commit cc66b19

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

.drone.yml

+21-9
Original file line numberDiff line numberDiff line change
@@ -58,33 +58,45 @@ services:
5858

5959
- name: redis-cluster
6060
image: grokzen/redis-cluster
61-
ports: [7000, 7001, 7002, 7003, 7004, 7005]
61+
ports: [ 7000, 7001, 7002, 7003, 7004, 7005 ]
6262

6363
- name: tile38
6464
image: tile38/tile38:latest
6565
ports:
6666
- 9851
6767

68-
- name: redis-sentinel
69-
image: docker.io/bitnami/redis-sentinel:6.0-debian-10
70-
environment:
71-
REDIS_MASTER_HOST: redis6
72-
ports:
73-
- 26379
74-
7568

7669
steps:
7770
- name: start
7871
image: "golang:1.16"
7972
commands:
80-
- sleep 5
73+
- sleep 10
8174
- 'echo "start"'
8275
when:
8376
event:
8477
- pull_request
8578
- push
8679
- tag
8780

81+
#
82+
# starting this service down here using "detached: true" because it depends on
83+
# the "redis6" service and it intermittently fails if that service is not available yet
84+
# making it start after the "start" step which waits 10 seconds hopefully fixes that issue
85+
#
86+
- name: redis-sentinel
87+
image: "docker.io/bitnami/redis-sentinel:6.2-debian-10"
88+
environment:
89+
REDIS_MASTER_HOST: redis6
90+
ports:
91+
- 26379
92+
detach: true
93+
when:
94+
event:
95+
- pull_request
96+
- push
97+
- tag
98+
depends_on:
99+
- start
88100

89101
- name: build-binaries
90102
image: "golang:1.16"

0 commit comments

Comments
 (0)