See this section from Drone's official documentation:
kind: pipeline
type: docker
name: default
steps:
- name: ping
image: redis
commands:
- sleep 5
- redis-cli -h cache ping
services:
- name: cache
image: redis
Afterwards, it gives this advice:
Be sure to give the service adequate time to initialize before attempting to connect. A naive solution is to use the sleep command.
I need a more reliable way to wait for the service to initialise before connecting to it in one of the steps in my drone.yml file. The issue with just using the sleep command is I don't know how long it may take for a particular service to initialise.