foodsoft/.drone.yml

124 lines
3.6 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 14:16:06 +01:00
2023-01-12 11:10:34 +01:00
---
2023-01-12 14:16:06 +01:00
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:
2023-01-12 14:27:58 +01:00
registry: git.local-it.org
repo: git.local-it.org/foodsoft/foodsoft
username: philipp
password:
from_secret: docker_registry
2023-01-12 14:16:06 +01:00
tags:
- latest
- ${DRONE_COMMIT}
2023-01-12 11:10:34 +01:00
- name: deployment
2023-01-12 14:51:12 +01:00
image: git.local-it.org/philipp/stack-ssh-deply:latest
2023-01-12 11:10:34 +01:00
settings:
2023-01-12 15:47:38 +01:00
stack: ${DRONE_COMMIT}
2023-01-12 11:10:34 +01:00
compose: "deployment/compose.yml"
deploy_key:
from_secret: drone_deploy_key
host: "dev.local-it.cloud"
user: "root"
port: 22
2023-01-12 14:47:05 +01:00
reg_user: philipp
reg_pass:
from_secret: docker_registry
2023-01-12 15:03:00 +01:00
reg_url: git.local-it.org
2023-01-12 14:47:05 +01:00
image: git.local-it.org/foodsoft/foodsoft:${DRONE_COMMIT}
2023-01-12 15:00:47 +01:00
generate_secrets: true
2023-01-12 15:08:20 +01:00
networks:
- proxy
2023-01-12 15:12:45 +01:00
environment:
IMAGE: git.local-it.org/foodsoft/foodsoft:${DRONE_COMMIT}
2023-01-12 15:15:49 +01:00
STACK_NAME: ${DRONE_COMMIT}
2023-01-12 15:12:45 +01:00
DOMAIN: "${DRONE_COMMIT}.foodsoft.dev.local-it.cloud"
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
APP_CONFIG_VERSION: v1
DB_CONFIG_VERSION: v1
ENTRYPOINT_VERSION: v1
PRODUCTION_ENV_VERSION: v1