Skip to content
Snippets Groups Projects
Commit 2752d072 authored by Fran Garcia-Linares's avatar Fran Garcia-Linares
Browse files

Issue #3441816 by fjgarlin, jonathan1055, cmlara: All variants run the same...

Issue #3441816 by fjgarlin, jonathan1055, cmlara: All variants run the same Drupal version when the pipeline is triggered via web
parent 472ef130
No related branches found
Tags 1.3.10
1 merge request!193Resolve #3441816 "Change variants variables"
Pipeline #160530 passed
# GitLab Templates Changelog
## 1.3.10 - 2024-04-23
#3441816 - All variants run the same Drupal version when the pipeline is triggered via web.\
#3442293 - Specify additional CSpell flag words.\
#3442509 - D7 drush failing drupal install.\
#3442120 - D7 pipeline fails with 413 Request Entity Too Large.\
#3440136 - Remove case that was not needed.\
#3441307 - Update logo with GitLab's new version.
## 1.3.9 - 2024-04-16
#3440136 - Improve deprecation process and provide BC so pipelines do not break.\
......
......@@ -132,3 +132,7 @@ Most environment variables are created when the pipeline is first built, but the
```
- !reference [ .create-environment-variables ]
```
## Running pipelines via the GitLab UI
You can run pipelines from the GitLab UI by navigating to: `Build` > `Pipelines` > `Run pipeline`. When you do this, all the variables inherited from the templates will be presented in the form and you can override any value. These changes will take priority over any pre-defined value or value set in the `.gitlab-ci.yml` file.
......@@ -153,6 +153,7 @@ variables:
# Projects with complex tests are welcome to increase this.
# Keeping this low helps jobs find an available runner without waiting.
KUBERNETES_CPU_REQUEST: 2
PHP_VERSION: $_TARGET_PHP
################
# Set global defaults, including:
......@@ -163,7 +164,7 @@ variables:
default:
interruptible: true
image:
name: $_CONFIG_DOCKERHUB_ROOT/php-$_TARGET_PHP-apache:$_TARGET_PHP_IMAGE_TAG
name: $_CONFIG_DOCKERHUB_ROOT/php-$PHP_VERSION-apache:$_TARGET_PHP_IMAGE_TAG
retry:
max: 2
when:
......@@ -317,7 +318,7 @@ composer (max PHP version):
- *opt-in-max-php-rule
- when: always
variables:
_TARGET_PHP: $CORE_LEG_PHP_MAX
PHP_VERSION: $CORE_LEG_PHP_MAX
################
# Validate Jobs
......@@ -407,7 +408,7 @@ phpunit (max PHP version):
needs:
- "composer (max PHP version)"
variables:
_TARGET_PHP: $CORE_LEG_PHP_MAX
PHP_VERSION: $CORE_LEG_PHP_MAX
# -----------------
# TEST-ONLY CHANGES
......
......@@ -209,6 +209,7 @@ variables:
# Projects with complex tests are welcome to increase this.
# Keeping this low helps jobs find an available runner without waiting.
KUBERNETES_CPU_REQUEST: 2
PHP_VERSION: $_TARGET_PHP
################
# Set global defaults, including:
......@@ -219,7 +220,7 @@ variables:
default:
interruptible: true
image:
name: $_CONFIG_DOCKERHUB_ROOT/php-$_TARGET_PHP-apache:$_TARGET_PHP_IMAGE_TAG
name: $_CONFIG_DOCKERHUB_ROOT/php-$PHP_VERSION-apache:$_TARGET_PHP_IMAGE_TAG
retry:
max: 2
when:
......@@ -291,6 +292,7 @@ stages:
variables:
COMPOSER_NO_INTERACTION: 1
IGNORE_PROJECT_DRUPAL_CORE_VERSION: 0
DRUPAL_CORE: $_TARGET_CORE
# Use artifacts to copy codebase to subsequent jobs.
# See https://lorisleiva.com/laravel-deployment-using-gitlab-pipelines/.
artifacts:
......@@ -351,7 +353,7 @@ composer (max PHP version):
- *opt-in-max-php-rule
- when: always
variables:
_TARGET_PHP: $CORE_PHP_MAX
PHP_VERSION: $CORE_PHP_MAX
composer (previous minor):
extends: .composer-base
......@@ -359,7 +361,7 @@ composer (previous minor):
- *opt-in-previous-minor-rule
- when: always
variables:
_TARGET_CORE: $CORE_SECURITY_PREVIOUS_MINOR
DRUPAL_CORE: $CORE_SECURITY_PREVIOUS_MINOR
IGNORE_PROJECT_DRUPAL_CORE_VERSION: 1
composer (previous major):
......@@ -368,8 +370,8 @@ composer (previous major):
- *opt-in-previous-major-rule
- when: always
variables:
_TARGET_PHP: $CORE_PREVIOUS_PHP_MIN
_TARGET_CORE: $CORE_PREVIOUS_STABLE
PHP_VERSION: $CORE_PREVIOUS_PHP_MIN
DRUPAL_CORE: $CORE_PREVIOUS_STABLE
IGNORE_PROJECT_DRUPAL_CORE_VERSION: 1
composer (next minor):
......@@ -378,7 +380,7 @@ composer (next minor):
- *opt-in-next-minor-rule
- when: always
variables:
_TARGET_CORE: $CORE_NEXT_MINOR
DRUPAL_CORE: $CORE_NEXT_MINOR
IGNORE_PROJECT_DRUPAL_CORE_VERSION: 1
composer (next major):
......@@ -387,8 +389,8 @@ composer (next major):
- *opt-in-next-major-rule
- when: always
variables:
_TARGET_PHP: $CORE_PHP_MAX
_TARGET_CORE: $CORE_MAJOR_DEVELOPMENT
PHP_VERSION: $CORE_PHP_MAX
DRUPAL_CORE: $CORE_MAJOR_DEVELOPMENT
IGNORE_PROJECT_DRUPAL_CORE_VERSION: 1
pages:
......@@ -523,7 +525,7 @@ phpstan (max PHP version):
needs:
- "composer (max PHP version)"
variables:
_TARGET_PHP: $CORE_PHP_MAX
PHP_VERSION: $CORE_PHP_MAX
phpstan (next minor):
extends: phpstan
......@@ -533,8 +535,6 @@ phpstan (next minor):
- *php-files-exist-rule
needs:
- "composer (next minor)"
variables:
_TARGET_CORE: $CORE_NEXT_MINOR
phpstan (next major):
extends: phpstan
......@@ -548,8 +548,7 @@ phpstan (next major):
- *amend-core-requirements-drupal-11
- !reference [phpstan, script]
variables:
_TARGET_PHP: $CORE_PHP_MAX
_TARGET_CORE: $CORE_MAJOR_DEVELOPMENT
PHP_VERSION: $CORE_PHP_MAX
stylelint:
stage: validate
......@@ -776,7 +775,7 @@ nightwatch (max PHP version):
needs:
- "composer (max PHP version)"
variables:
_TARGET_PHP: $CORE_PHP_MAX
PHP_VERSION: $CORE_PHP_MAX
nightwatch (previous minor):
extends: nightwatch
......@@ -787,8 +786,7 @@ nightwatch (previous minor):
needs:
- "composer (previous minor)"
variables:
_TARGET_PHP: $CORE_PHP_MIN
_TARGET_CORE: $CORE_SECURITY_PREVIOUS_MINOR
PHP_VERSION: $CORE_PHP_MIN
nightwatch (previous major):
extends: nightwatch
......@@ -799,8 +797,7 @@ nightwatch (previous major):
needs:
- "composer (previous major)"
variables:
_TARGET_PHP: $CORE_PREVIOUS_PHP_MIN
_TARGET_CORE: $CORE_PREVIOUS_STABLE
PHP_VERSION: $CORE_PREVIOUS_PHP_MIN
nightwatch (next minor):
allow_failure: true
......@@ -811,8 +808,6 @@ nightwatch (next minor):
- *nightwatch-tests-exist-rule
needs:
- "composer (next minor)"
variables:
_TARGET_CORE: $CORE_NEXT_MINOR
nightwatch (next major):
allow_failure: true
......@@ -827,8 +822,7 @@ nightwatch (next major):
- *amend-core-requirements-drupal-11
- !reference [nightwatch, script]
variables:
_TARGET_PHP: $CORE_PHP_MAX
_TARGET_CORE: $CORE_MAJOR_DEVELOPMENT
PHP_VERSION: $CORE_PHP_MAX
# -------
# PHPUNIT
......@@ -910,7 +904,7 @@ phpunit (max PHP version):
needs:
- "composer (max PHP version)"
variables:
_TARGET_PHP: $CORE_PHP_MAX
PHP_VERSION: $CORE_PHP_MAX
phpunit (previous minor):
extends: phpunit
......@@ -920,8 +914,6 @@ phpunit (previous minor):
- *phpunit-tests-exist-rule
needs:
- "composer (previous minor)"
variables:
_TARGET_CORE: $CORE_SECURITY_PREVIOUS_MINOR
phpunit (previous major):
extends: phpunit
......@@ -932,8 +924,7 @@ phpunit (previous major):
needs:
- "composer (previous major)"
variables:
_TARGET_PHP: $CORE_PREVIOUS_PHP_MIN
_TARGET_CORE: $CORE_PREVIOUS_STABLE
PHP_VERSION: $CORE_PREVIOUS_PHP_MIN
# Future versions, hence breaks may arrive at any time: failure is allowed.
phpunit (next minor):
......@@ -945,8 +936,6 @@ phpunit (next minor):
- *phpunit-tests-exist-rule
needs:
- "composer (next minor)"
variables:
_TARGET_CORE: $CORE_NEXT_MINOR
phpunit (next major):
allow_failure: true
......@@ -961,8 +950,7 @@ phpunit (next major):
- *amend-core-requirements-drupal-11
- !reference [phpunit, script]
variables:
_TARGET_PHP: $CORE_PHP_MAX
_TARGET_CORE: $CORE_MAJOR_DEVELOPMENT
PHP_VERSION: $CORE_PHP_MAX
# -----------------
# TEST-ONLY CHANGES
......
......@@ -38,7 +38,7 @@ if (
}
// Conditionally add prophecy.
$core_version = str_replace(['^', '~'], ['', ''], getenv('_TARGET_CORE'));
$core_version = str_replace(['^', '~'], ['', ''], getenv('DRUPAL_CORE'));
if (
!isset($json_project['require-dev']['phpspec/prophecy-phpunit']) &&
(version_compare($core_version, '9', '>=') && version_compare($core_version, '10', '<'))
......@@ -109,7 +109,7 @@ file_put_contents(empty(getenv('COMPOSER')) ? $path : getenv('COMPOSER'), json_e
* Get default composer.json contents.
*/
function default_json(string $project_name): array {
$drupalConstraint = getenv('_TARGET_CORE') ?: '^9';
$drupalConstraint = getenv('DRUPAL_CORE') ?: '^9';
$webRoot = getenv('_WEB_ROOT') ?: 'web';
return [
'name' => 'drupal/' . $project_name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment