Compare commits

..

8 commits

Author SHA1 Message Date
Abdel LAMRANI
37a459a62e fix for testing rector CI 2026-08-03 10:46:36 +02:00
Abdel LAMRANI
317d124f87 fix for testing rector CI 2026-08-03 10:40:56 +02:00
Abdel LAMRANI
e88a796700 fix for testing rector CI 2026-08-03 10:37:10 +02:00
Abdel LAMRANI
9a715e40f8 fix for testing rector CI 2026-08-03 10:33:51 +02:00
Abdel LAMRANI
a24a24c082 fix for testing rector CI 2026-08-03 10:33:16 +02:00
Abdel LAMRANI
a8021b40d8 fix for testing rector CI 2026-08-03 10:29:30 +02:00
Abdel LAMRANI
e3635365bc fix for testing rector CI 2026-08-03 10:22:51 +02:00
Abdel LAMRANI
35ce7d1376 config rector if we needet 2026-08-03 09:11:22 +02:00
8 changed files with 19 additions and 75 deletions

View file

@ -1,27 +1,23 @@
composer-build:
stage: build
image: composer:2.10
cache:
key:
files:
- composer.lock
paths:
- vendor/
policy: pull-push
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
before_script:
- composer config gitlab-token.lab.s-web.fr "${CI_DEPLOY_USER}" "${CI_DEPLOY_PASSWORD}"
script:
- composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --no-dev --prefer-dist
artifacts:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
cache:
paths:
- vendor/
expire_in: 1h
script:
- composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts
artifacts:
expose_as: 'vendor'
paths:
- vendor
allow_failure: false
dependencies:
- composer-security
needs:
- job: composer-security
optional: true
allow_failure: false
rules:
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_TAG != null
- if: $CI_COMMIT_TAG != null

View file

@ -8,7 +8,6 @@
--context "${CI_PROJECT_DIR}"
--build-arg "GITLAB_USER=${CI_DEPLOY_USER}"
--build-arg "GITLAB_PASSWORD=${CI_DEPLOY_PASSWORD}"
--build-arg "PHP_8_5_TAG=${PHP_8_5_TAG}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${IMAGE_TAG}"
--cache=true

View file

@ -1,16 +1,5 @@
spec:
inputs:
larastan_bootstrap:
default: false
type: boolean
db_connection:
default: "sqlite"
db_database:
default: ":memory:"
cache_store:
default: "array"
session_driver:
default: "array"
enable_rector:
default: false
type: boolean
@ -24,12 +13,6 @@ include:
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'lint/phpstan.yml'
inputs:
larastan_bootstrap: $[[ inputs.larastan_bootstrap ]]
db_connection: $[[ inputs.db_connection ]]
db_database: $[[ inputs.db_database ]]
cache_store: $[[ inputs.cache_store ]]
session_driver: $[[ inputs.session_driver ]]
- project: "ldc-web/shared-ci"
ref: "main"
file: "lint/rector.yml"

View file

@ -1,6 +1,6 @@
phpcs:
stage: lint
image: composer:2.10
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts

View file

@ -1,40 +1,9 @@
spec:
inputs:
larastan_bootstrap:
default: false
type: boolean
db_connection:
default: "sqlite"
db_database:
default: ":memory:"
cache_store:
default: "array"
session_driver:
default: "array"
---
phpstan:
stage: lint
image: composer:2.10
cache:
key: phpstan-cache-${CI_COMMIT_REF_SLUG}
paths:
- vendor/
- .phpstan-cache/
variables:
DB_CONNECTION: "$[[ inputs.db_connection ]]"
DB_DATABASE: "$[[ inputs.db_database ]]"
CACHE_STORE: "$[[ inputs.cache_store ]]"
SESSION_DRIVER: "$[[ inputs.session_driver ]]"
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts --no-interaction
- |
if [ "$[[ inputs.larastan_bootstrap ]]" = "true" ]; then
cp .env.example .env
php artisan key:generate
fi
- composer install --no-scripts
script:
- vendor/bin/phpstan --error-format=junit > phpstan-report.xml
artifacts:

View file

@ -8,15 +8,14 @@ spec:
rector:
stage: lint
image: composer:2.10
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
cache:
key: rector-cache-$CI_COMMIT_REF_SLUG
paths:
- vendor/
- .rector-cache/
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
- composer install --no-scripts --no-interaction
- composer install --no-scripts
script:
- vendor/bin/rector process --dry-run --no-progress-bar --output-format=junit > rector-report.xml
artifacts:

View file

@ -1,10 +1,8 @@
composer-security:
stage: security
image: composer:2.10
before_script:
- composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD
image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest
script:
- composer audit --locked --format=json > composer-security-checker-report.json || true
- local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json
artifacts:
when: on_failure
expose_as: 'composer-security-checker'

View file

@ -1,6 +1,6 @@
npm-security:
stage: security
image: node:24
image: node:17.9.1
before_script:
- npm install --location=global audit-ci@^6
script: