ci: add mysqldump (jsrouting)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2022-12-28 15:24:57 +01:00
parent c6e9a61f2a
commit 7f9f44d9af
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -1,20 +1,25 @@
pipeline:
create_db:
image: mariadb:10.3
secrets: [mysqldump]
commands:
- sleep 20
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
- eval "$MYSQLDUMP" | mysql -hdb -uroot -proot app
config:
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
composer:
image: deblan/php:8.1
commands:
- apt-get update && apt-get -y install git
- composer install --no-scripts
migrate:
image: deblan/php:8.1
environment:
@ -25,6 +30,8 @@ pipeline:
image: deblan/php:8.1
commands:
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
- cat public/js/fos_js_routes.json
node:
image: node:16-slim
commands:
@ -48,7 +55,6 @@ pipeline:
- sed -i "s/ssh_user/$SSH_USER/g" .mage.yml
- sed -i "s/ssh_host/$SSH_HOST/g" .mage.yml
- sed -i "s#app_directory#$APP_DIRECTORY#g" .mage.yml
- cat .mage.yml
# - /root/.config/composer/vendor/bin/mage
# when:
# event: [deploy]