From c411cf1df6d284ec6f1446bbef40c5af791dddd2 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Thu, 28 Jul 2022 09:28:09 +0200 Subject: [PATCH] Update CI --- .gitlab-ci.yml | 43 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80c0035..cb2dd3f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,46 @@ -image: jakzal/phpqa:php7.3 +image: $CI_REGISTRY/service-web-lab/ldc-web-images-docker/ldcweb-qa:php7.3-1.0 stages: - Security + - CodingStandards -security: +composer-security: stage: Security script: - - local-php-security-checker --format=json --path=./composer.lock > security-checker-report.json + - local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json artifacts: + when: on_failure + expose_as: 'composer-security-checker' paths: - - security-checker-report.json - allow_failure: false + - composer-security-checker-report.json + allow_failure: true + +npm-security: + stage: Security + script: + - audit-ci -p npm -o json > npm-security-checker-report.json + artifacts: + when: on_failure + expose_as: 'npm-security-checker' + paths: + - npm-security-checker-report.json + allow_failure: true + +phpcs: + stage: CodingStandards + before_script: + - composer config gitlab-token.gitlab.com $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD + - composer install + cache: + paths: + - vendor/ + script: + - vendor/bin/phpcs --report=junit --report-file=phpcs-report.xml + artifacts: + when: on_failure + expose_as: 'phpcs' + paths: + - phpcs-report.xml + reports: + junit: phpcs-report.xml + allow_failure: false \ No newline at end of file