Issue #3398321 by bbrala, catch: Optimize GitLab resource requests phase 1

(cherry picked from commit e6d787eb17)
merge-requests/5260/head
catch 2023-11-02 22:49:46 +00:00
parent 77945942cc
commit 9f466b66d0
2 changed files with 29 additions and 3 deletions

View File

@ -49,6 +49,9 @@ variables:
GIT_DEPTH: "3"
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
.default-lint-variables: &default-lint-variables
_TARGET_PHP: "8.2"
_TARGET_DB: "sqlite-3"
#############
# Stages #
@ -73,9 +76,6 @@ stages:
- stuck_or_timeout_failure
- runner_system_failure
- scheduler_failure
variables:
_TARGET_PHP: "8.2"
_TARGET_DB: "sqlite-3"
image:
name: $_CONFIG_DOCKERHUB_ROOT/php-$_TARGET_PHP-apache:production
rules:
@ -224,6 +224,9 @@ stages:
'📦️ Composer':
<<: *default-job-settings-lint
variables:
<<: *default-lint-variables
KUBERNETES_CPU_REQUEST: "1"
stage: 🏗️ Build
cache:
key:
@ -243,6 +246,9 @@ stages:
'📦️ Yarn':
<<: *default-job-settings-lint
variables:
<<: *default-lint-variables
KUBERNETES_CPU_REQUEST: "2"
stage: 🏗️ Build
cache:
key:
@ -266,6 +272,9 @@ stages:
'🧹 PHP Static Analysis (phpstan)':
<<: [ *with-composer, *junit-artifacts, *default-job-settings-lint ]
stage: 🪄 Lint
variables:
<<: *default-lint-variables
KUBERNETES_CPU_REQUEST: "16"
script:
- php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --error-format=gitlab > phpstan-quality-report.json
artifacts:
@ -275,6 +284,9 @@ stages:
'🧹 PHP Coding standards (PHPCS)':
<<: [ *with-composer, *junit-artifacts, *default-job-settings-lint ]
stage: 🪄 Lint
variables:
<<: *default-lint-variables
KUBERNETES_CPU_REQUEST: "16"
script:
- composer phpcs -- --report-full --report-summary --report-\\Micheh\\PhpCodeSniffer\\Report\\Gitlab=phpcs-quality-report.json
artifacts:
@ -284,6 +296,8 @@ stages:
'🧹 JavaScript linting (eslint)':
<<: [ *with-yarn, *junit-artifacts, *default-job-settings-lint ]
stage: 🪄 Lint
variables:
KUBERNETES_CPU_REQUEST: "2"
script:
- yarn --cwd=./core run -s lint:core-js-passing --format gitlab
artifacts:
@ -293,6 +307,8 @@ stages:
'🧹 CSS linting (stylelint)':
<<: [ *with-yarn, *junit-artifacts, *default-job-settings-lint ]
stage: 🪄 Lint
variables:
KUBERNETES_CPU_REQUEST: "2"
script:
- yarn run --cwd=./core lint:css --color --custom-formatter=node_modules/stylelint-formatter-gitlab
artifacts:
@ -302,6 +318,8 @@ stages:
'🧹 Compilation check':
<<: [ *with-yarn, *default-job-settings-lint ]
stage: 🪄 Lint
variables:
KUBERNETES_CPU_REQUEST: "2"
script:
- yarn run --cwd=./core build:css --check
- cd core && yarn run -s check:ckeditor5
@ -309,6 +327,8 @@ stages:
'📔 Spell-checking':
<<: [ *with-yarn, *default-job-settings-lint ]
stage: 🪄 Lint
variables:
KUBERNETES_CPU_REQUEST: "2"
script:
- export TARGET_BRANCH=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}${CI_COMMIT_BRANCH}
- git fetch -vn --depth=$GIT_DEPTH "${CI_MERGE_REQUEST_PROJECT_URL:-origin}" "+refs/heads/$TARGET_BRANCH:refs/heads/$TARGET_BRANCH"

View File

@ -141,6 +141,7 @@ stages:
<<: *test-variables
TESTSUITE: PHPUnit-Functional
CONCURRENCY: "$CONCURRENCY"
KUBERNETES_CPU_REQUEST: "24"
services:
- <<: *with-database
@ -190,6 +191,7 @@ stages:
<<: *test-variables
TESTSUITE: PHPUnit-Kernel
CONCURRENCY: "$CONCURRENCY"
KUBERNETES_CPU_REQUEST: "16"
services:
- <<: *with-database
@ -200,6 +202,7 @@ stages:
<<: *test-variables
TESTSUITE: PHPUnit-FunctionalJavascript
CONCURRENCY: 15
KUBERNETES_CPU_REQUEST: "8"
services:
- <<: *with-database
- <<: *with-chrome
@ -210,6 +213,7 @@ stages:
<<: *test-variables
TESTSUITE: PHPUnit-Build
CONCURRENCY: "$CONCURRENCY"
KUBERNETES_CPU_REQUEST: "2"
services:
- <<: *with-database
@ -223,11 +227,13 @@ stages:
<<: *test-variables
TESTSUITE: PHPUnit-Unit
CONCURRENCY: "$CONCURRENCY"
KUBERNETES_CPU_REQUEST: "16"
'🦉️️️ Nightwatch':
<<: [ *with-composer-and-yarn, *setup-webserver, *default-job-settings ]
variables:
<<: *test-variables
KUBERNETES_CPU_REQUEST: "3"
services:
- <<: *with-database
- <<: *with-chrome