From a2a860cca87c80d56a5932a5d0c6c5df26250c3b Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 29 Mar 2024 13:00:50 +0100 Subject: [PATCH 1/3] update mage conf --- .mage.yml.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mage.yml.dist b/.mage.yml.dist index 3034e89..438a14b 100644 --- a/.mage.yml.dist +++ b/.mage.yml.dist @@ -1,6 +1,6 @@ magephp: log_dir: /tmp - environments: + environments: prod: user: ssh_user from: ./ From ab6196da551b65e3c4f7780c8e8d95d29b71010c Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 29 Mar 2024 13:04:39 +0100 Subject: [PATCH 2/3] update ci steps names --- .woodpecker/build.yml | 20 ++++++++++++-------- .woodpecker/deploy.yml | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 5731024..323bf17 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -7,50 +7,54 @@ when: branch: [master, develop] 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 commands: - mysql -hdb -uroot -proot -e "CREATE DATABASE app" - app-config: + "Configure app": 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: + "Installs PHP dependencies": image: deblan/php:8.0 commands: - apt-get update && apt-get -y install git - composer install --no-scripts - php-build: + "Migrates database": image: deblan/php:8.0 environment: - PHP=php commands: - ./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 - node-build: + "Build assets": image: node:16-alpine commands: - yarn - 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: diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index a57f874..08d1b5c 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -8,7 +8,7 @@ when: skip_clone: true steps: - app-deploy: + "Deploy the app": image: deblan/mage secrets: [ssh_user, ssh_host, ssh_priv_key, app_directory] volumes: *volumes From caa2a9e7f8717650714d48aaa4ff1e92571f8177 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 29 Mar 2024 13:46:18 +0100 Subject: [PATCH 3/3] update node version --- .woodpecker/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 323bf17..c118a31 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -43,7 +43,7 @@ steps: - php bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json "Build assets": - image: node:16-alpine + image: node:21-alpine commands: - yarn - npm run build