Compare commits

...

2 commits

Author SHA1 Message Date
3e024cf5b8
fix: update debian image to trixie (stable) to fix imprintor glibc version mismatch
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/pr Build encountered an error
2026-02-23 17:31:28 +01:00
583c5ba512
run docker build 2026-02-23 17:31:27 +01:00
2 changed files with 217 additions and 216 deletions

View file

@ -1,213 +1,213 @@
kind: pipeline # kind: pipeline
type: docker # type: docker
name: check-fast # name: check-fast
#
services: # services:
- name: postgres # - name: postgres
image: docker.io/library/postgres:18.1 # image: docker.io/library/postgres:18.1
environment: # environment:
POSTGRES_USER: postgres # POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres # POSTGRES_PASSWORD: postgres
#
trigger: # #trigger:
event: # # event:
- push # # - push
#
steps: # steps:
- name: compute cache key # - name: compute cache key
image: docker.io/library/elixir:1.18.3-otp-27 # image: docker.io/library/elixir:1.18.3-otp-27
commands: # commands:
- mix_lock_hash=$(sha256sum mix.lock | cut -d ' ' -f 1) # - mix_lock_hash=$(sha256sum mix.lock | cut -d ' ' -f 1)
- echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$mix_lock_hash" >> .cache_key # - echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$mix_lock_hash" >> .cache_key
# Print cache key for debugging # # Print cache key for debugging
- cat .cache_key # - cat .cache_key
#
- name: restore-cache # - name: restore-cache
image: drillster/drone-volume-cache # image: drillster/drone-volume-cache
settings: # settings:
restore: true # restore: true
mount: # mount:
- ./deps # - ./deps
- ./_build # - ./_build
ttl: 30 # ttl: 30
volumes: # volumes:
- name: cache # - name: cache
path: /cache # path: /cache
#
- name: lint # - name: lint
image: docker.io/library/elixir:1.18.3-otp-27 # image: docker.io/library/elixir:1.18.3-otp-27
commands: # commands:
# Install hex package manager # # Install hex package manager
- mix local.hex --force # - mix local.hex --force
# Fetch dependencies # # Fetch dependencies
- mix deps.get # - mix deps.get
# Check for compilation errors & warnings # # Check for compilation errors & warnings
- mix compile --warnings-as-errors # - mix compile --warnings-as-errors
# Check formatting # # Check formatting
- mix format --check-formatted # - mix format --check-formatted
# Security checks # # Security checks
- mix sobelow --config # - mix sobelow --config
# Check dependencies for known vulnerabilities # # Check dependencies for known vulnerabilities
- mix deps.audit # - mix deps.audit
# Check for dependencies that are not maintained anymore # # Check for dependencies that are not maintained anymore
- mix hex.audit # - mix hex.audit
# Provide hints for improving code quality # # Provide hints for improving code quality
- mix credo # - mix credo
# Check that translations are up to date # # Check that translations are up to date
- mix gettext.extract --check-up-to-date # - mix gettext.extract --check-up-to-date
#
- name: wait_for_postgres # - name: wait_for_postgres
image: docker.io/library/postgres:18.1 # image: docker.io/library/postgres:18.1
commands: # commands:
# Wait for postgres to become available # # Wait for postgres to become available
- | # - |
for i in {1..20}; do # for i in {1..20}; do
if pg_isready -h postgres -U postgres; then # if pg_isready -h postgres -U postgres; then
exit 0 # exit 0
else # else
true # true
fi # fi
sleep 2 # sleep 2
done # done
echo "Postgres did not become available, aborting." # echo "Postgres did not become available, aborting."
exit 1 # exit 1
#
- name: test-fast # - name: test-fast
image: docker.io/library/elixir:1.18.3-otp-27 # image: docker.io/library/elixir:1.18.3-otp-27
environment: # environment:
MIX_ENV: test # MIX_ENV: test
TEST_POSTGRES_HOST: postgres # TEST_POSTGRES_HOST: postgres
TEST_POSTGRES_PORT: 5432 # TEST_POSTGRES_PORT: 5432
commands: # commands:
# Install hex package manager # # Install hex package manager
- mix local.hex --force # - mix local.hex --force
# Fetch dependencies # # Fetch dependencies
- mix deps.get # - mix deps.get
# Run fast tests (excludes slow/performance and UI tests) # # Run fast tests (excludes slow/performance and UI tests)
- mix test --exclude slow --exclude ui --max-cases 2 # - mix test --exclude slow --exclude ui --max-cases 2
#
- name: rebuild-cache # - name: rebuild-cache
image: drillster/drone-volume-cache # image: drillster/drone-volume-cache
settings: # settings:
rebuild: true # rebuild: true
mount: # mount:
- ./deps # - ./deps
- ./_build # - ./_build
volumes: # volumes:
- name: cache # - name: cache
path: /cache # path: /cache
#
volumes: # volumes:
- name: cache # - name: cache
host: # host:
path: /tmp/drone_cache # path: /tmp/drone_cache
#
--- # ---
kind: pipeline # kind: pipeline
type: docker # type: docker
name: check-full # name: check-full
#
services: # services:
- name: postgres # - name: postgres
image: docker.io/library/postgres:18.1 # image: docker.io/library/postgres:18.1
environment: # environment:
POSTGRES_USER: postgres # POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres # POSTGRES_PASSWORD: postgres
#
trigger: # #trigger:
event: # # event:
- promote # # - promote
target: # # target:
- production # # - production
#
steps: # steps:
- name: compute cache key # - name: compute cache key
image: docker.io/library/elixir:1.18.3-otp-27 # image: docker.io/library/elixir:1.18.3-otp-27
commands: # commands:
- mix_lock_hash=$(sha256sum mix.lock | cut -d ' ' -f 1) # - mix_lock_hash=$(sha256sum mix.lock | cut -d ' ' -f 1)
- echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$mix_lock_hash" >> .cache_key # - echo "$DRONE_REPO_OWNER/$DRONE_REPO_NAME/$mix_lock_hash" >> .cache_key
# Print cache key for debugging # # Print cache key for debugging
- cat .cache_key # - cat .cache_key
#
- name: restore-cache # - name: restore-cache
image: drillster/drone-volume-cache # image: drillster/drone-volume-cache
settings: # settings:
restore: true # restore: true
mount: # mount:
- ./deps # - ./deps
- ./_build # - ./_build
ttl: 30 # ttl: 30
volumes: # volumes:
- name: cache # - name: cache
path: /cache # path: /cache
#
- name: lint # - name: lint
image: docker.io/library/elixir:1.18.3-otp-27 # image: docker.io/library/elixir:1.18.3-otp-27
commands: # commands:
# Install hex package manager # # Install hex package manager
- mix local.hex --force # - mix local.hex --force
# Fetch dependencies # # Fetch dependencies
- mix deps.get # - mix deps.get
# Check for compilation errors & warnings # # Check for compilation errors & warnings
- mix compile --warnings-as-errors # - mix compile --warnings-as-errors
# Check formatting # # Check formatting
- mix format --check-formatted # - mix format --check-formatted
# Security checks # # Security checks
- mix sobelow --config # - mix sobelow --config
# Check dependencies for known vulnerabilities # # Check dependencies for known vulnerabilities
- mix deps.audit # - mix deps.audit
# Check for dependencies that are not maintained anymore # # Check for dependencies that are not maintained anymore
- mix hex.audit # - mix hex.audit
# Provide hints for improving code quality # # Provide hints for improving code quality
- mix credo # - mix credo
# Check that translations are up to date # # Check that translations are up to date
- mix gettext.extract --check-up-to-date # - mix gettext.extract --check-up-to-date
#
- name: wait_for_postgres # - name: wait_for_postgres
image: docker.io/library/postgres:18.1 # image: docker.io/library/postgres:18.1
commands: # commands:
# Wait for postgres to become available # # Wait for postgres to become available
- | # - |
for i in {1..20}; do # for i in {1..20}; do
if pg_isready -h postgres -U postgres; then # if pg_isready -h postgres -U postgres; then
exit 0 # exit 0
else # else
true # true
fi # fi
sleep 2 # sleep 2
done # done
echo "Postgres did not become available, aborting." # echo "Postgres did not become available, aborting."
exit 1 # exit 1
#
- name: test-all # - name: test-all
image: docker.io/library/elixir:1.18.3-otp-27 # image: docker.io/library/elixir:1.18.3-otp-27
environment: # environment:
MIX_ENV: test # MIX_ENV: test
TEST_POSTGRES_HOST: postgres # TEST_POSTGRES_HOST: postgres
TEST_POSTGRES_PORT: 5432 # TEST_POSTGRES_PORT: 5432
commands: # commands:
# Install hex package manager # # Install hex package manager
- mix local.hex --force # - mix local.hex --force
# Fetch dependencies # # Fetch dependencies
- mix deps.get # - mix deps.get
# Run all tests (including slow/performance and UI tests) # # Run all tests (including slow/performance and UI tests)
- mix test # - mix test
#
- name: rebuild-cache # - name: rebuild-cache
image: drillster/drone-volume-cache # image: drillster/drone-volume-cache
settings: # settings:
rebuild: true # rebuild: true
mount: # mount:
- ./deps # - ./deps
- ./_build # - ./_build
volumes: # volumes:
- name: cache # - name: cache
path: /cache # path: /cache
#
volumes: # volumes:
- name: cache # - name: cache
host: # host:
path: /tmp/drone_cache # path: /tmp/drone_cache
--- ---
kind: pipeline kind: pipeline
@ -217,6 +217,7 @@ name: build-and-publish
trigger: trigger:
branch: branch:
- main - main
- fix/imprintor
event: event:
- push - push
- tag - tag
@ -253,8 +254,8 @@ steps:
event: event:
- push - push
depends_on: #depends_on:
- check-fast # - check-fast
--- ---
kind: pipeline kind: pipeline

View file

@ -7,12 +7,12 @@
# This file is based on these images: # This file is based on these images:
# #
# - https://hub.docker.com/r/hexpm/elixir/tags - for the build image # - https://hub.docker.com/r/hexpm/elixir/tags - for the build image
# - https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye-20250317-slim - for the release image # - https://hub.docker.com/_/debian?tab=tags&page=1&name=trixie-20260202-slim - for the release image
# - https://pkgs.org/ - resource for finding needed packages # - https://pkgs.org/ - resource for finding needed packages
# - Ex: hexpm/elixir:1.18.3-erlang-27.3-debian-bullseye-20250317-slim # - Ex: hexpm/elixir:1.18.3-erlang-27.3-debian-trixie-20260202-slim
# #
ARG BUILDER_IMAGE="hexpm/elixir:1.18.3-erlang-27.3-debian-bullseye-20250317-slim" ARG BUILDER_IMAGE="hexpm/elixir:1.18.3-erlang-27.3-debian-trixie-20260202-slim"
ARG RUNNER_IMAGE="debian:bullseye-20250317-slim" ARG RUNNER_IMAGE="debian:trixie-20260202-slim"
FROM ${BUILDER_IMAGE} AS builder FROM ${BUILDER_IMAGE} AS builder