2023-03-08 19:25:24 -05:00
|
|
|
name: default
|
|
|
|
kind: pipeline
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install
|
2024-04-25 21:50:38 -04:00
|
|
|
image: ruby:3.3.1
|
2023-03-08 19:25:24 -05:00
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/bundle install --jobs=3 --retry=3
|
|
|
|
|
|
|
|
- name: autoload
|
2024-04-25 21:50:38 -04:00
|
|
|
image: ruby:3.3.1
|
2023-03-08 19:25:24 -05:00
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/rails zeitwerk:check
|
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
- name: lint
|
2024-04-25 21:50:38 -04:00
|
|
|
image: ruby:3.3.1
|
2023-03-08 19:25:24 -05:00
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
2024-06-21 23:35:36 -04:00
|
|
|
- bin/rubocop
|
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
- name: brakeman
|
|
|
|
image: ruby:3.3.1
|
|
|
|
volumes:
|
|
|
|
- name: bundle
|
|
|
|
path: /usr/local/bundle
|
|
|
|
commands:
|
|
|
|
- bin/brakeman
|
2023-03-08 19:25:24 -05:00
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
- name: test
|
2024-04-25 21:50:38 -04:00
|
|
|
image: ruby:3.3.1
|
2023-03-08 19:25:24 -05:00
|
|
|
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
|