diff --git a/build/build8.3.yml b/build/build8.3.yml new file mode 100644 index 0000000..5415e96 --- /dev/null +++ b/build/build8.3.yml @@ -0,0 +1,10 @@ +include: + - project: "ldc-web/shared-ci" + ref: "main" + file: "build/composer8.3.yml" + - project: "ldc-web/shared-ci" + ref: "main" + file: "build/npm.yml" + - project: "ldc-web/shared-ci" + ref: "main" + file: "build/docker.yml" diff --git a/build/composer-bedrock8.3.yml b/build/composer-bedrock8.3.yml new file mode 100644 index 0000000..05df29e --- /dev/null +++ b/build/composer-bedrock8.3.yml @@ -0,0 +1,28 @@ +composer-build: + stage: build + image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest + before_script: + - composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD + - composer config http-basic.connect.advancedcustomfields.com $APP_ACF_USER $APP_ACF_PWD + cache: + paths: + - vendor/ + - public/ + + script: + - composer install --no-dev --optimize-autoloader --classmap-authoritative + artifacts: + expose_as: "composer-build" + paths: + - vendor + - public + allow_failure: false + dependencies: + - composer-security + needs: + - job: composer-security + optional: true + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_TAG != null diff --git a/build/composer8.3.yml b/build/composer8.3.yml new file mode 100644 index 0000000..ed6b548 --- /dev/null +++ b/build/composer8.3.yml @@ -0,0 +1,24 @@ +composer-build: + stage: build + image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest + before_script: + - composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD + cache: + paths: + - vendor/ + 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 + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_TAG != null diff --git a/lint/lint8.3.yml b/lint/lint8.3.yml new file mode 100644 index 0000000..52d6b88 --- /dev/null +++ b/lint/lint8.3.yml @@ -0,0 +1,13 @@ +include: + - project: "ldc-web/shared-ci" + ref: "main" + file: "lint/phpcs8.3.yml" + - project: "ldc-web/shared-ci" + ref: "main" + file: "lint/phpstan8.3.yml" + - project: "ldc-web/shared-ci" + ref: "main" + file: "lint/eslint.yml" + - project: "ldc-web/shared-ci" + ref: "main" + file: "lint/stylelint.yml" diff --git a/lint/phpcs8.3.yml b/lint/phpcs8.3.yml new file mode 100644 index 0000000..f43bc52 --- /dev/null +++ b/lint/phpcs8.3.yml @@ -0,0 +1,18 @@ +phpcs: + stage: lint + image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest + before_script: + - composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD + - composer install --no-scripts + 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 + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" diff --git a/lint/phpstan8.3.yml b/lint/phpstan8.3.yml new file mode 100644 index 0000000..adfa322 --- /dev/null +++ b/lint/phpstan8.3.yml @@ -0,0 +1,18 @@ +phpstan: + stage: lint + image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa-8.3:latest + before_script: + - composer config gitlab-token.lab.s-web.fr $CI_DEPLOY_USER $CI_DEPLOY_PASSWORD + - composer install --no-scripts + script: + - vendor/bin/phpstan --error-format=junit > phpstan-report.xml + artifacts: + when: on_failure + expose_as: "phpstan" + paths: + - phpstan-report.xml + reports: + junit: phpstan-report.xml + allow_failure: true + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" diff --git a/security/composer8.3.yml b/security/composer8.3.yml new file mode 100644 index 0000000..60edbf5 --- /dev/null +++ b/security/composer8.3.yml @@ -0,0 +1,15 @@ +composer-security: + stage: security + image: $CI_REGISTRY/ldc-web/projets/ldc-web-images-docker/ldcweb-qa:php8.3-latest + script: + - local-php-security-checker --format=json --path=./composer.lock > composer-security-checker-report.json + artifacts: + when: on_failure + expose_as: "composer-security-checker" + paths: + - composer-security-checker-report.json + allow_failure: true + rules: + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + - if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main" + - if: $CI_COMMIT_TAG != null diff --git a/security/security8.3.yml b/security/security8.3.yml new file mode 100644 index 0000000..e23cac9 --- /dev/null +++ b/security/security8.3.yml @@ -0,0 +1,7 @@ +include: + - project: "ldc-web/shared-ci" + ref: "main" + file: "security/composer8.3.yml" + - project: "ldc-web/shared-ci" + ref: "main" + file: "security/npm.yml"