2022-02-13 21:19:47 +01:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-02-15 19:25:44 +01:00
|
|
|
name: Tests
|
2022-02-13 21:19:47 +01:00
|
|
|
|
|
|
|
steps:
|
2022-02-13 21:25:31 +01:00
|
|
|
- name: Tests
|
2022-02-13 21:30:46 +01:00
|
|
|
image: docker/compose:1.29.2
|
2022-02-15 20:03:29 +01:00
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run/docker.sock
|
2022-02-13 21:19:47 +01:00
|
|
|
commands:
|
2022-02-27 20:11:41 +01:00
|
|
|
- docker-compose down -v --remove-orphans -t0
|
2022-02-14 00:16:04 +01:00
|
|
|
- docker-compose build
|
|
|
|
- docker-compose --profile tests build
|
2022-02-14 00:04:55 +01:00
|
|
|
- docker-compose run --rm db-migrations
|
|
|
|
- docker-compose up -d
|
|
|
|
- docker-compose run --rm tests
|
2022-02-13 23:54:36 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
host:
|
2022-02-15 19:24:22 +01:00
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- tag
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-02-15 19:25:44 +01:00
|
|
|
name: Deploy
|
2022-02-15 19:24:22 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Tests
|
|
|
|
image: docker/compose:1.29.2
|
2022-02-15 20:03:29 +01:00
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run/docker.sock
|
2022-02-15 19:24:22 +01:00
|
|
|
commands:
|
2022-02-27 20:11:41 +01:00
|
|
|
- docker-compose down -v --remove-orphans -t0
|
2022-02-15 19:24:22 +01:00
|
|
|
- docker-compose build
|
|
|
|
- docker-compose --profile tests build
|
|
|
|
- docker-compose run --rm db-migrations
|
|
|
|
- docker-compose up -d
|
|
|
|
- docker-compose run --rm tests
|
2022-04-22 14:33:14 +02:00
|
|
|
- name: Build images
|
2022-02-15 20:03:29 +01:00
|
|
|
image: docker/compose:1.29.2
|
2022-02-15 19:24:22 +01:00
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
commands:
|
2022-02-15 20:03:29 +01:00
|
|
|
- docker build -t lilleman/auth-api-db-migrate:$DRONE_TAG -f ./Dockerfile.migrations .
|
|
|
|
- docker build -t lilleman/auth-api:$DRONE_TAG -f ./Dockerfile .
|
|
|
|
- name: Push to Docker Hub
|
|
|
|
image: docker/compose:1.29.2
|
2022-02-15 20:11:58 +01:00
|
|
|
environment:
|
|
|
|
DOCKERHUB_TOKEN:
|
|
|
|
from_secret: dockerhub
|
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
path: /var/run/docker.sock
|
2022-02-15 20:03:29 +01:00
|
|
|
commands:
|
2022-02-15 20:11:58 +01:00
|
|
|
- docker login -u lilleman -p $DOCKERHUB_TOKEN
|
2022-02-15 20:03:29 +01:00
|
|
|
- docker push lilleman/auth-api-db-migrate:$DRONE_TAG
|
|
|
|
- docker push lilleman/auth-api:$DRONE_TAG
|
2022-02-15 20:17:25 +01:00
|
|
|
- docker tag lilleman/auth-api-db-migrate:$DRONE_TAG lilleman/auth-api-db-migrate:latest
|
|
|
|
- docker tag lilleman/auth-api:$DRONE_TAG lilleman/auth-api:latest
|
2022-02-15 20:14:33 +01:00
|
|
|
- docker push lilleman/auth-api-db-migrate:latest
|
|
|
|
- docker push lilleman/auth-api:latest
|
2022-02-15 19:24:22 +01:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: docker-sock
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|