update steps

This commit is contained in:
Simon Vieille 2024-03-03 19:34:27 +01:00
parent 508a816642
commit 676e9dfe67
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 10 additions and 10 deletions

View file

@ -8,44 +8,44 @@ when:
branch: [master, master-*, develop, develop-*, feature/*]
steps:
db-wait:
"Wait the database":
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:
"Create database":
image: mariadb:10.3
secrets: [mysqldump]
commands:
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
- eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
app-config:
"Configure app":
image: deblan/php:8.1
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:
"Installs PHP dependencies":
image: deblan/php:8.1
commands:
- apt-get update && apt-get -y install git
- composer install --no-scripts
db-migrate:
"Migrates database":
image: deblan/php:8.1
environment:
- PHP=php
commands:
- ./bin/doctrine-migrate
app-jsroutes:
"Generates JS routes":
image: deblan/php:8.1
commands:
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
node-build:
"Build assets":
image: node:16-alpine
environment:
- CPU_COUNT=3
@ -60,13 +60,13 @@ steps:
- test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
- npm run build
security-check:
"Check dependencies":
image: gitnet.fr/deblan/osv-detector:v0.9
commands:
- osv-detector composer.lock yarn.lock
failure: ignore
cache-build:
"Build the cache":
image: deblan/mage
volumes: *volumes
commands:

View file

@ -8,7 +8,7 @@ when:
skip_clone: true
steps:
app-deploy:
"Deploy":
image: deblan/mage
secrets: [ssh_priv_key, ssh_user, ssh_host, app_directory]
volumes: *volumes