suivi/.woodpecker/build.yml
Simon Vieille e075b3fd3c
Some checks failed
ci/woodpecker/push/build Pipeline failed
fix ci
2024-03-22 09:58:49 +01:00

65 lines
1.5 KiB
YAML

variables:
- &volumes
- /data/${CI_REPO}:/builds
when:
event: [push, pull_request, tag, manual]
branch: [master, develop]
steps:
db-wait:
image: gitnet.fr/deblan/timeout:latest
commands:
- /bin/timeout -t 30 -v -c 'while true; do nc -z -v db 3306 2>&1 | grep succeeded && exit 0; sleep 0.5; done'
db-create:
image: mariadb:10.3
commands:
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
app-config:
image: deblan/php:8.0
commands:
- echo APP_ENV=prod >> .env.local
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
php-composer:
image: deblan/php:8.0
commands:
- apt-get update && apt-get -y install git
- composer install --no-scripts
php-build:
image: deblan/php:8.0
environment:
- PHP=php
commands:
- ./bin/doctrine-migrate
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
node-build:
image: node:16-alpine
commands:
- yarn
- npm run build
security-check:
image: gitnet.fr/deblan/osv-detector:v0.9
commands:
- osv-detector composer.lock yarn.lock
failure: ignore
cache-build:
image: deblan/mage
volumes: *volumes
commands:
- cd /builds
- rsync -az "$CI_WORKSPACE/" "$CI_COMMIT_SHA"
services:
db:
image: mariadb:10.3
environment:
- MARIADB_ROOT_PASSWORD=root