foodsoft/.drone.yml

108 lines
3.2 KiB
YAML
Raw Normal View History

2023-01-05 13:46:28 +01:00
kind: pipeline
type: docker
2023-01-12 11:10:34 +01:00
name: build and test
2023-01-05 13:46:28 +01:00
steps:
- name: build_test
image: circleci/ruby:2.6.9-bullseye-node-browsers-legacy
commands:
- sudo apt install --no-install-recommends -y libmagic-dev
- sudo -E bundle install --path /bundle --without production,development
- sudo -E bundle exec rake foodsoft:setup:stock_config || true
- sudo -E bundle exec rake db:schema:load
- sudo -E bundle exec rake rspec-rerun:spec
volumes:
- name: gem-cache
path: /bundle
- name: tmp
path: /drone/src/tmp
environment:
RAILS_LOG_TO_STDOUT: true
RAILS_ENV: test
COVERAGE: lcov
2023-01-12 11:10:34 +01:00
DATABASE_URL: mysql2://user:password@mariadb/test?encoding=utf8mb4
2023-01-05 13:46:28 +01:00
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true
PARALLEL_TEST_PROCESSORS: 15
services:
- name: mariadb
image: mariadb
environment:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
volumes:
- name: gem-cache
host:
path: /tmp/cache
- name: tmp
temp: {}
2023-01-12 11:10:34 +01:00
---
kind: pipeline
type: docker
name: docker build and deploy
steps:
- name: build and publish docker image
image: plugins/docker
settings:
username: yksflip
from_secret: docker_registry
repo: yksflip/foodsoft
2023-01-12 11:22:25 +01:00
tags:
- latest
- ${DRONE_COMMIT_SHA}
2023-01-12 11:10:34 +01:00
- name: deployment
image: decentral1se/stack-ssh-deploy:latest
settings:
stack: "foodsoft"
compose: "deployment/compose.yml"
deploy_key:
from_secret: drone_deploy_key
host: "dev.local-it.cloud"
user: "root"
port: 22
environment:
STACK_NAME: foodsoft
2023-01-12 11:22:25 +01:00
DOMAIN: "${DRONE_COMMIT_SHA}.foodsoft.dev.local-it.cloud"
2023-01-12 11:10:34 +01:00
LETS_ENCRYPT_ENV: production
FOODCOOP_MULTI_INSTALL: true
FOODCOOP_NAME: example
FOODCOOP_CITY: XXX
FOODCOOP_COUNTRY: XXX
FOODCOOP_EMAIL: info@example.org
FOODCOOP_PHONE: XXX
FOODCOOP_STREET: XXX
FOODCOOP_ZIP_CODE: XXX
FOODCOOP_HOMEPAGE: https://order.example.org
FOODCOOP_HELP_URL: https://order.example.org
FOODCOOP_TIME_ZONE: Berlin
FOODCOOP_USE_NICK: true
FOODCOOP_LANGUAGE: de
FOODCOOP_FOOTER: '<a href="https://example.org/">example</a> hosted by <a href="https://yourhoster.org">Your Tech Co-op</a>.'
USE_APPLE_POINTS: false
STOP_ORDERING_UNDER: 75
MINIMUM_BALANCE: 0
MYSQL_DB: foodsoft
MYSQL_HOST: db
MYSQL_PORT: 3306
MYSQL_USER: foodsoft
EMAIL_SENDER: noreply@example.org
EMAIL_ERROR: systems@example.org
SMTP_ADDRESS: mail.example.com
SMTP_AUTHENTICATION: plain
SMTP_DOMAIN: mail.example.com
SMTP_ENABLE_STARTTLS_AUTO: true
SMTP_PORT: 587
SMTP_USER_NAME: foodsoft
EMAIL_REPLY_DOMAIN: example.org
SMTP_SERVER_HOST: 0.0.0.0
SMTP_SERVER_PORT: 2525
SECRET_DB_PASSWORD_VERSION: v1
SECRET_DB_ROOT_PASSWORD_VERSION: v1
SECRET_SHARED_LISTS_DB_PASSWORD_VERSION: v1
SECRET_SMTP_PASSWORD_VERSION: v1
SECRET_SECRET_KEY_BASE_VERSION: v1
generate_secrets: true