ci: #3551487 Add the GitLab CI pipeline and fix the lint failures it reports

Adds the GitLab CI pipeline to 2.1.x, which the branch has never had, and fixes the lint failures it reports so the pipeline is green from the first run.

Work by Artem Konotopchyk (the pipeline, the ESLint and Stylelint fixes, and the upgrade-status core requirement), with follow-up commits from the maintainer.

Maintainer follow-ups

  • Every lint job gates the merge: _ALL_VALIDATE_ALLOW_FAILURE: '0', so nothing passes on a warning.
  • Templates ref pinned (_GITLAB_TEMPLATES_REF and _CURL_TEMPLATES_REF at 1.15.7), so an upstream change cannot turn a green pipeline red without a deliberate bump.
  • A guarded functional end-to-end job, plus a slim .gitlab-ci-local.yml for the jobs that reproduce locally. The job is created only when a feature file exists (rules: exists:), so it stays out of the pipeline until the test suite in [#3619108] lands, and the rest of the pipeline is unaffected until then.
  • One tag exclusion, commented in place: the duplicate-value scenarios in that suite cover a guard that lives in [#2903340], so they are skipped until that fix lands. Both this file and the feature file say to drop the tag and the exclusion at that point.

This branch also carries the one coding-standards error on 2.1.x HEAD (trailing whitespace in the element class), which belongs here rather than in a separate issue, since this is the branch that turns the checks on.

Verified

Pipeline green: 17 jobs, nothing non-green, every gating job allow_failure: false — composer, phpcs, phpstan, eslint, stylelint, cspell, composer-lint and upgrade status. The five allow_failure: true jobs are the upstream template's own optional manual composer matrix variants (next and previous major/minor, max PHP version), not masked by this project.

Closes #3551487

Checkpoints:

  • File an issue
  • Addition/Change/Update/Fix
  • Testing to ensure no regression
  • Automated unit testing coverage
  • Automated functional testing coverage
  • UX/UI designer responsibilities
  • Readability
  • Accessibility
  • Performance
  • Security
  • Developer Documentation
  • User Guide Documentation
  • Reviewed by human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Release notes snippet
  • Release

AI-Generated: Yes — for the maintainer's follow-up commits only (446fae27, 942741a5, 957a79fc). Artem's commits are their own work.

Edited by Rajab Natshah

Merge request reports

Loading