Compare commits

...

4 commits

Author SHA1 Message Date
Simon Vieille c0c480452a Merge branch 'develop'
All checks were successful
ci/woodpecker/push/build Pipeline was successful
2024-03-29 13:46:21 +01:00
Simon Vieille caa2a9e7f8
update node version
Some checks failed
ci/woodpecker/push/build Pipeline failed
2024-03-29 13:46:18 +01:00
Simon Vieille ab6196da55
update ci steps names
Some checks failed
ci/woodpecker/push/build Pipeline failed
2024-03-29 13:04:39 +01:00
Simon Vieille a2a860cca8
update mage conf
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/deployment/deploy Pipeline was successful
2024-03-29 13:00:50 +01:00
3 changed files with 15 additions and 11 deletions

View file

@ -7,50 +7,54 @@ when:
branch: [master, develop] branch: [master, develop]
steps: steps:
db-wait: "Wait the database":
image: gitnet.fr/deblan/timeout:latest image: gitnet.fr/deblan/timeout:latest
commands: 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' - /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 image: mariadb:10.3
commands: commands:
- mysql -hdb -uroot -proot -e "CREATE DATABASE app" - mysql -hdb -uroot -proot -e "CREATE DATABASE app"
app-config: "Configure app":
image: deblan/php:8.0 image: deblan/php:8.0
commands: commands:
- echo APP_ENV=prod >> .env.local - echo APP_ENV=prod >> .env.local
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local - echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local - echo DATABASE_URL=mysql://root:root@db/app >> .env.local
php-composer: "Installs PHP dependencies":
image: deblan/php:8.0 image: deblan/php:8.0
commands: commands:
- apt-get update && apt-get -y install git - apt-get update && apt-get -y install git
- composer install --no-scripts - composer install --no-scripts
php-build: "Migrates database":
image: deblan/php:8.0 image: deblan/php:8.0
environment: environment:
- PHP=php - PHP=php
commands: commands:
- ./bin/doctrine-migrate - ./bin/doctrine-migrate
"Generates JS routes":
image: deblan/php:8.0
commands:
- php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json - php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
node-build: "Build assets":
image: node:16-alpine image: node:21-alpine
commands: commands:
- yarn - yarn
- npm run build - npm run build
security-check: "Check dependencies":
image: gitnet.fr/deblan/osv-detector:v0.9 image: gitnet.fr/deblan/osv-detector:v0.9
commands: commands:
- osv-detector composer.lock yarn.lock - osv-detector composer.lock yarn.lock
failure: ignore failure: ignore
cache-build: "Build the cache":
image: deblan/mage image: deblan/mage
volumes: *volumes volumes: *volumes
commands: commands:

View file

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