2022-01-23 00:36:35 -05:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: cannery
|
|
|
|
|
|
|
|
steps:
|
2022-02-17 23:41:31 -05:00
|
|
|
- name: restore-cache
|
|
|
|
image: drillster/drone-volume-cache
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
|
|
|
settings:
|
|
|
|
restore: true
|
|
|
|
mount:
|
|
|
|
- _build
|
|
|
|
- deps
|
2022-02-17 23:42:53 -05:00
|
|
|
- assets/node_modules/
|
2022-02-17 23:41:31 -05:00
|
|
|
|
2022-01-23 00:36:35 -05:00
|
|
|
- name: test
|
2022-04-19 20:12:28 -04:00
|
|
|
image: elixir:1.13.4-alpine
|
2022-01-23 00:36:35 -05:00
|
|
|
environment:
|
|
|
|
TEST_DATABASE_URL: ecto://postgres:postgres@database/cannery_test
|
2022-02-17 23:15:08 -05:00
|
|
|
HOST: testing.example.tld
|
2022-01-23 00:36:35 -05:00
|
|
|
commands:
|
|
|
|
- mix local.rebar --force
|
|
|
|
- mix local.hex --force
|
|
|
|
- mix deps.get
|
|
|
|
- npm install --prefix assets
|
|
|
|
- mix test
|
|
|
|
|
2022-02-19 18:42:17 -05:00
|
|
|
- name: build and publish stable
|
2022-02-10 23:17:06 -05:00
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
repo: shibaobun/cannery
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2022-02-19 21:29:29 -05:00
|
|
|
tags: latest
|
2022-02-17 23:02:33 -05:00
|
|
|
when:
|
2022-02-17 23:41:31 -05:00
|
|
|
branch:
|
2022-02-17 23:02:33 -05:00
|
|
|
- stable
|
2022-02-10 23:17:06 -05:00
|
|
|
|
2022-02-19 18:42:17 -05:00
|
|
|
- name: build and publish tagged version
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
repo: shibaobun/cannery
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
tags:
|
|
|
|
- ${DRONE_TAG}
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
2022-02-17 23:41:31 -05:00
|
|
|
- name: rebuild-cache
|
|
|
|
image: drillster/drone-volume-cache
|
|
|
|
volumes:
|
|
|
|
- name: cache
|
|
|
|
path: /cache
|
|
|
|
settings:
|
|
|
|
rebuild: true
|
|
|
|
mount:
|
|
|
|
- _build
|
|
|
|
- deps
|
2022-02-17 23:42:53 -05:00
|
|
|
- assets/node_modules/
|
2022-02-17 23:41:31 -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:
|
2022-02-17 23:41:31 -05:00
|
|
|
- name: cache
|
|
|
|
host:
|
2022-03-04 23:36:19 -05:00
|
|
|
path: /run/media/default/ssdsrv/gitea/drone-cache
|
2022-02-10 23:17:06 -05:00
|
|
|
- name: docker_sock
|
|
|
|
host:
|
|
|
|
path: /var/run/docker.sock
|