cannery/.drone.yml

48 lines
838 B
YAML
Raw Normal View History

2022-01-23 00:36:35 -05:00
kind: pipeline
type: docker
name: cannery
cache:
mount:
- _build
- deps
steps:
- name: test
image: bitwalker/alpine-elixir-phoenix:1.13
environment:
TEST_DATABASE_URL: ecto://postgres:postgres@database/cannery_test
commands:
- mix local.rebar --force
- mix local.hex --force
- mix deps.get
- npm install --prefix assets
- mix test
2022-02-10 23:17:06 -05:00
- name: build and publish
image: plugins/docker
settings:
repo: shibaobun/cannery
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password
2022-02-17 23:02:33 -05:00
when:
branch:
include:
- stable
2022-02-10 23:17:06 -05:00
2022-01-23 00:36:35 -05:00
services:
- name: database
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
2022-02-10 23:17:06 -05:00
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock