2023-03-08 19:25:24 -05:00
|
|
|
name: default
|
|
|
|
kind: pipeline
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install
|
|
|
|
image: ruby:3.2.0
|
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/bundle install --jobs=3 --retry=3
|
|
|
|
|
|
|
|
- name: autoload
|
|
|
|
image: ruby:3.2.0
|
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/rails zeitwerk:check
|
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
- name: lint
|
|
|
|
image: ruby:3.2.0
|
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/bundle exec standardrb
|
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
- name: test
|
|
|
|
image: ruby:3.2.0
|
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/rails assets:precompile
|
|
|
|
- bin/rails test
|
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
temp: {}
|
2023-03-12 10:27:02 -04:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
exclude: master
|
|
|
|
event: push
|
|
|
|
|
|
|
|
---
|
|
|
|
name: deploy
|
|
|
|
kind: pipeline
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: docker-build
|
|
|
|
image: plugins/docker
|
|
|
|
environment:
|
|
|
|
SECRET_KEY_BASE:
|
|
|
|
from_secret: secret_key_base
|
|
|
|
RAILS_MASTER_KEY:
|
|
|
|
from_secret: rails_master_key
|
|
|
|
settings:
|
|
|
|
pull_image: true
|
|
|
|
registry: docker.atomaka.com
|
|
|
|
repo: docker.atomaka.com/budget
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${DRONE_TAG}
|
|
|
|
- name: deploy
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: unraid_host
|
|
|
|
username:
|
|
|
|
from_secret: unraid_username
|
|
|
|
key:
|
|
|
|
from_secret: unraid_ssh_key
|
|
|
|
script:
|
|
|
|
- docker pull docker.atomaka.com/budget:latest
|
|
|
|
- docker restart budget
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event: tag
|