A
A
Ai Lab2019-08-06 22:45:15
Virtualization
Ai Lab, 2019-08-06 22:45:15

How to raise a service using drone ci?

There is a simple pipeline that should raise a service, for example, a redis service. How to make it so that the service does not terminate after starting?
Now, after completing all the steps, the container is deleted automatically. I understand that apparently drone ci is needed for "assembly", and not for managing services, but it would be very convenient if the infrastructure could also be lifted from the code. Maybe I'm doing something wrong?

kind: pipeline
name: default

steps:
- name: test-redis
  image: redis
  commands:
  - sleep 5
  - redis-cli -h redis ping
  - redis-cli -h redis set FOO bar
  - redis-cli -h redis get FOO

services:
- name: redis
  image: redis
  detach: true
  ports:
  - 6379

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question