cannery/.drone.yml
shibao cee89aa69c
All checks were successful
continuous-integration/drone/push Build is passing
remove attempt to cache dialyzer
2022-02-17 23:58:30 -05:00

70 lines
1.2 KiB
YAML

kind: pipeline
type: docker
name: cannery
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- _build
- deps
- assets/node_modules/
- 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:
- stable
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- _build
- deps
- assets/node_modules/
services:
- name: database
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
volumes:
- name: cache
host:
path: /tmp/drone-cache
- name: docker_sock
host:
path: /var/run/docker.sock