135 lines
2.8 KiB
YAML
135 lines
2.8 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: check
|
|
|
|
services:
|
|
- name: postgres
|
|
image: docker.io/library/postgres:17.6
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: setup
|
|
image: docker.io/library/elixir:1.18.3-otp-27
|
|
commands:
|
|
- mix local.hex --force
|
|
- mix local.rebar --force
|
|
- mix deps.get
|
|
|
|
- name: build
|
|
image: docker.io/library/elixir:1.18.3-otp-27
|
|
depends_on:
|
|
- setup
|
|
commands:
|
|
- mix local.hex --force
|
|
- mix local.rebar --force
|
|
- mix compile --warnings-as-errors
|
|
|
|
- name: lint
|
|
image: docker.io/library/elixir:1.18.3-otp-27
|
|
depends_on:
|
|
- build
|
|
commands:
|
|
- mix local.hex --force
|
|
- mix local.rebar --force
|
|
- mix format --check-formatted
|
|
- mix sobelow --config
|
|
- mix deps.audit
|
|
- mix hex.audit
|
|
- mix credo
|
|
- mix gettext.extract --check-up-to-date
|
|
|
|
- name: test
|
|
image: docker.io/library/elixir:1.18.3-otp-27
|
|
depends_on:
|
|
- setup
|
|
environment:
|
|
MIX_ENV: test
|
|
TEST_POSTGRES_HOST: postgres
|
|
TEST_POSTGRES_PORT: 5432
|
|
commands:
|
|
- mix local.hex --force
|
|
- mix local.rebar --force
|
|
- mix test --max-cases 16
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: build-and-publish
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
- tag
|
|
|
|
steps:
|
|
- name: build-and-publish-container
|
|
image: plugins/docker
|
|
settings:
|
|
registry: git.local-it.org
|
|
repo: git.local-it.org/local-it/mitgliederverwaltung
|
|
username:
|
|
from_secret: DRONE_REGISTRY_USERNAME
|
|
password:
|
|
from_secret: DRONE_REGISTRY_TOKEN
|
|
auto_tag: true
|
|
auto_tag_suffix: ${DRONE_COMMIT_SHA:0:8}
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: build-and-publish-container-branch
|
|
image: plugins/docker
|
|
settings:
|
|
registry: git.local-it.org
|
|
repo: git.local-it.org/local-it/mitgliederverwaltung
|
|
username:
|
|
from_secret: DRONE_REGISTRY_USERNAME
|
|
password:
|
|
from_secret: DRONE_REGISTRY_TOKEN
|
|
tags:
|
|
- latest
|
|
- ${DRONE_COMMIT_SHA:0:8}
|
|
when:
|
|
event:
|
|
- push
|
|
|
|
depends_on:
|
|
- check
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: renovate
|
|
|
|
trigger:
|
|
event:
|
|
- cron
|
|
- custom
|
|
branch:
|
|
- main
|
|
|
|
environment:
|
|
LOG_LEVEL: debug
|
|
|
|
steps:
|
|
- name: renovate
|
|
image: renovate/renovate:41.173
|
|
environment:
|
|
RENOVATE_CONFIG_FILE: "renovate_backend_config.js"
|
|
RENOVATE_TOKEN:
|
|
from_secret: RENOVATE_TOKEN
|
|
GITHUB_COM_TOKEN:
|
|
from_secret: GITHUB_COM_TOKEN
|
|
commands:
|
|
# https://github.com/renovatebot/renovate/discussions/15049
|
|
- unset GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL
|
|
- renovate-config-validator
|
|
- renovate
|