cannery/.drone.yml

50 lines
898 B
YAML

kind: pipeline
type: docker
name: cannery
cache:
mount:
- _build
- deps
- ~/.cache/dialyzer/plts/
steps:
- name: test
image: bitwalker/alpine-elixir-phoenix:1.13
environment:
TEST_DATABASE_URL: ecto://postgres:postgres@database/cannery_test
HOST: testing.example.tld
commands:
- mix local.rebar --force
- mix local.hex --force
- mix deps.get
- npm install --prefix assets
- mix test
- name: build and publish
image: plugins/docker
settings:
repo: shibaobun/cannery
tags: latest
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
branch:
include:
- stable
services:
- name: database
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock