auth-api/.drone.yml
Lilleman ec1eaddd11
All checks were successful
continuous-integration/drone/push Build is passing
Updated tag pipeline
2022-02-15 19:49:55 +01:00

61 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: Tests
steps:
- name: Tests
image: docker/compose:1.29.2
commands:
- docker-compose build
- docker-compose --profile tests build
- docker-compose run --rm db-migrations
- docker-compose up -d
- docker-compose run --rm tests
volumes:
- name: docker-sock
path: /var/run/docker.sock
volumes:
- name: docker-sock
host:
path: /var/run/docker.sock
trigger:
event:
exclude:
- tag
---
kind: pipeline
type: docker
name: Deploy
steps:
- name: Tests
image: docker/compose:1.29.2
commands:
- docker-compose build
- docker-compose --profile tests build
- docker-compose run --rm db-migrations
- docker-compose up -d
- docker-compose run --rm tests
volumes:
- name: docker-sock
path: /var/run/docker.sock
- name: Build db migration
image: docker/compose:1.29.2
environment:
DOCKERHUB_TOKEN:
from_secret: dockerhub
commands:
- docker build -t auth-api-db-migrate:$DRONE_TAG -f ./Dockerfile.migrations
- docker build -t auth-api:$DRONE_TAG -f ./Dockerfile
volumes:
- name: docker-sock
host:
path: /var/run/docker.sock
trigger:
event:
- tag