From 7ebefee1c46c7ff3a3e5597ae831f64b6ea93148 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 28 Oct 2026 13:15:51 +0100 Subject: [PATCH] feat: Update CICD --- .gitlab-ci.yml | 6 ++-- Dockerfile | 3 +- app/Console/Kernel.php | 1 - app/Http/Kernel.php | 4 --- composer.json | 3 +- composer.lock | 75 +++++++++++++++++++++++++++++++++++++++++- manifest.yaml | 19 ++++------- 7 files changed, 88 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88d18e1..6c3e4af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,13 @@ include: - project: "ldc-web/shared-ci" ref: "main" - file: "lint/lint7.3.yml" + file: "lint/lint.yml" - project: "ldc-web/shared-ci" ref: "main" - file: "security/security7.3.yml" + file: "security/security.yml" - project: "ldc-web/shared-ci" ref: "main" - file: "build/build7.3.yml" + file: "build/build.yml" - project: "ldc-web/shared-ci" ref: "main" file: "test/test.yml" diff --git a/Dockerfile b/Dockerfile index b732c9e..47b6f2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-7.3:060825-070701 +ARG PHP_8_5_TAG=latest +FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG} COPY --chown=www-data:www-data . /app/srcs USER root RUN chmod -R 755 /app/srcs/storage diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index ab0f49f..f0f699e 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -24,7 +24,6 @@ class Kernel extends ConsoleKernel * * @var array */ - #[\Override] protected $commands = [ \App\Console\Commands\CustomersClaims::class, \App\Console\Commands\ArchiveStatsCommand::class, diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index be7b352..8e476fd 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -13,7 +13,6 @@ class Kernel extends HttpKernel * * @var array */ - #[\Override] protected $middleware = [ \App\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, @@ -27,7 +26,6 @@ class Kernel extends HttpKernel * * @var array */ - #[\Override] protected $middlewareGroups = [ 'web' => [ \App\Http\Middleware\EncryptCookies::class, @@ -52,7 +50,6 @@ class Kernel extends HttpKernel * * @var array */ - #[\Override] protected $middlewareAliases = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, @@ -73,7 +70,6 @@ class Kernel extends HttpKernel * * @var array */ - #[\Override] protected $middlewarePriority = [ \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, diff --git a/composer.json b/composer.json index baafc3f..c058b04 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,10 @@ "laravel/framework": "^13.0", "laravel/tinker": "^3.0", "laravel/ui": "^4.0", + "ldc/ldccrmv4client": "^4.1", "picqer/php-barcode-generator": "^0.3.0", "sentry/sentry-laravel": "^4.13", - "ldc/ldccrmv4client": "^4.1" + "uwil/laravel-k8s": "^4.0" }, "require-dev": { "filp/whoops": "^2.0", diff --git a/composer.lock b/composer.lock index b9431bc..2258c85 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6d6cd448ee0ddcb0797446666d446de2", + "content-hash": "3171eb4d4e2f1933d1940488a10079d3", "packages": [ { "name": "barryvdh/laravel-dompdf", @@ -7174,6 +7174,79 @@ }, "time": "2025-12-02T11:56:42+00:00" }, + { + "name": "uwil/laravel-k8s", + "version": "4.0.4", + "source": { + "type": "git", + "url": "git@lab.s-web.fr:ldc-web/projets/k8s-laravel.git", + "reference": "40ed74d246538e6cd60a7f2059780898323e5a7e" + }, + "dist": { + "type": "zip", + "url": "https://lab.s-web.fr/api/v4/projects/90/packages/composer/archives/uwil/laravel-k8s.zip?sha=40ed74d246538e6cd60a7f2059780898323e5a7e", + "reference": "40ed74d246538e6cd60a7f2059780898323e5a7e", + "shasum": "" + }, + "require": { + "illuminate/support": "~8|~9|~10|~11|~12|~13", + "laravel/framework": "~8|~9|~10|~11|~12|~13", + "php": "~7.3|~7.4|~8" + }, + "require-dev": { + "driftingly/rector-laravel": "^2.3", + "larastan/larastan": "^3.9", + "laravel/pint": "^1.29", + "orchestra/testbench": "^11.1", + "slevomat/coding-standard": "^8.3", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Uwil\\LaravelK8S\\K8SServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Uwil\\LaravelK8S\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Uwil\\LaravelK8S\\Tests\\": "tests" + } + }, + "scripts": { + "phpcs": [ + "./vendor/bin/phpcs" + ], + "rector": [ + "./vendor/bin/rector" + ], + "phpstan": [ + "./vendor/bin/phpstan" + ], + "post-autoload-dump": [ + "@php ./vendor/bin/testbench package:discover --ansi" + ] + }, + "license": [ + "MIT" + ], + "description": "Laravel requirements for k8s.", + "keywords": [ + "k8s", + "laravel", + "uwil" + ], + "support": { + "email": "digital@ldc.fr", + "issues": "https://lab.s-web.fr/ldc-web/projets/laravel-k8s/-/issues" + } + }, { "name": "vlucas/phpdotenv", "version": "v5.8.0", diff --git a/manifest.yaml b/manifest.yaml index 720cb28..2e73eb8 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -55,11 +55,6 @@ spec: containers: - name: ${CI_PROJECT_PATH_SLUG}-container image: $IMAGE_TAG - command: ["/bin/sh", "-c"] - args: - - | - php artisan storage:link || true - exec apache2-foreground envFrom: - configMapRef: name: ${CI_PROJECT_PATH_SLUG}-config-map @@ -90,9 +85,9 @@ spec: imagePullSecrets: - name: docker-registry-credentials securityContext: - runAsUser: 33 - runAsGroup: 33 - fsGroup: 33 + runAsUser: 82 + runAsGroup: 82 + fsGroup: 82 fsGroupChangePolicy: "OnRootMismatch" volumes: - name: storage @@ -108,7 +103,7 @@ spec: app: ${CI_PROJECT_PATH_SLUG}-app ports: - port: 80 - targetPort: 443 + targetPort: 80 --- apiVersion: traefik.io/v1alpha1 kind: IngressRoute @@ -173,8 +168,8 @@ spec: persistentVolumeClaim: claimName: ${CI_PROJECT_PATH_SLUG}-pvc-storage securityContext: - runAsUser: 33 - runAsGroup: 33 - fsGroup: 33 + runAsUser: 82 + runAsGroup: 82 + fsGroup: 82 fsGroupChangePolicy: "OnRootMismatch" restartPolicy: OnFailure