diff --git a/build/composer.yml b/build/composer.yml index c558ad2..59fa0b2 100644 --- a/build/composer.yml +++ b/build/composer.yml @@ -1,23 +1,27 @@ composer-build: stage: build - 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 + image: composer:2.10 cache: + key: + files: + - composer.lock paths: - vendor/ + policy: pull-push + before_script: + - composer config gitlab-token.lab.s-web.fr "${CI_DEPLOY_USER}" "${CI_DEPLOY_PASSWORD}" script: - - composer install --no-dev --optimize-autoloader --classmap-authoritative --no-scripts + - composer install --ignore-platform-reqs --no-interaction --no-plugins --no-scripts --no-dev --prefer-dist artifacts: - expose_as: 'vendor' - paths: - - vendor - allow_failure: false + paths: + - vendor/ + expire_in: 1h 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 \ No newline at end of file + - if: $CI_COMMIT_TAG != null diff --git a/lint/phpcs.yml b/lint/phpcs.yml index 0caa3fd..8c66abf 100644 --- a/lint/phpcs.yml +++ b/lint/phpcs.yml @@ -1,6 +1,6 @@ phpcs: stage: lint - image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest + image: composer:2.10 before_script: - composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD - composer install --no-scripts diff --git a/lint/phpstan.yml b/lint/phpstan.yml index 8aeaee0..7b730a2 100644 --- a/lint/phpstan.yml +++ b/lint/phpstan.yml @@ -16,7 +16,12 @@ spec: phpstan: stage: lint - image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest + 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 ]]" @@ -24,7 +29,7 @@ phpstan: SESSION_DRIVER: "$[[ inputs.session_driver ]]" before_script: - composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD - - composer install --no-scripts + - composer install --no-scripts --no-interaction - | if [ "$[[ inputs.larastan_bootstrap ]]" = "true" ]; then cp .env.example .env diff --git a/lint/rector.yml b/lint/rector.yml index 7de98f2..16a4621 100644 --- a/lint/rector.yml +++ b/lint/rector.yml @@ -8,14 +8,15 @@ spec: rector: stage: lint - image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest + image: composer:2.10 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 + - composer install --no-scripts --no-interaction script: - vendor/bin/rector process --dry-run --no-progress-bar --output-format=junit > rector-report.xml artifacts: diff --git a/security/composer.yml b/security/composer.yml index fa9bcdb..e06b1c5 100644 --- a/security/composer.yml +++ b/security/composer.yml @@ -1,8 +1,8 @@ composer-security: stage: security - image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/uwil-qa-8.5:latest + image: composer:2.10 script: - - local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json + - composer audit --locked --format=json > composer-security-checker-report.json || true artifacts: when: on_failure expose_as: 'composer-security-checker' diff --git a/security/npm.yml b/security/npm.yml index 35dc6d6..71f7c36 100644 --- a/security/npm.yml +++ b/security/npm.yml @@ -1,6 +1,6 @@ npm-security: stage: security - image: node:17.9.1 + image: node:24 before_script: - npm install --location=global audit-ci@^6 script: