- Issue created by @catch
- 🇪🇸Spain fjgarlin
The downside is we don't want to run lint jobs on every possibly environment on branch tests, so should ideally restrict them to only a couple of environments. Not sure how to do that yet but assume it's possible.
We can set a variable in the parent to pass it to the child. ie:
.gitlab-ci.yml'PHP 8.1 MySQL 5.7': <<: [ *default-stage, *run-on-commit ] variables: _TARGET_PHP: "8.1" _TARGET_DB: "mysql-5.7" RUN_LINT: "1"
pipeline.yml
...inside lint jobs... rules: - if: $RUN_LINT == "1"
- 🇬🇧United Kingdom longwave UK
1. Can be solved with 📌 Use composer and yarn artifacts from parent pipeline Needs work
2. Core branch runs do get lint pipelines run? See e.g. https://git.drupalcode.org/project/drupal/-/pipelines/26646
3. I think we decided that linting doesn't really vary between environments; certainly JavaScript doesn't care which combination of PHP and database we are on, and it's unlikely except for perhaps the PHPStan case that the PHP version matters either.
- 🇬🇧United Kingdom catch
#2 is right about commit tests, I was looking at the scheduled branch pipelines, which don't run linting steps. Given that we might not need this issue at all then. #3 there are potentially deprecations picked up differently between phpcs for different PHP versions, but we can mostly solve that with the per-branch configuration for default jobs so makes this much lower priority.
- Status changed to Closed: duplicate
about 1 year ago 2:56pm 4 October 2023 - 🇬🇧United Kingdom catch
Marking duplicate of 📌 Use composer and yarn artifacts from parent pipeline Needs work which handles nearly all of what I wanted to achieve here.