Add _PHPSTAN_EXTRA and _NIGHTWATCH_EXTRA variables

Created on 8 April 2025, about 1 month ago

Problem/Motivation

We have {command}_EXTRA variables for CSpell, ESlint, Stylelint, parallel_lint, PHPCS, upgrade_status and PHPUnit. But there are none for PHPStan and Nightwatch. Both of these commands can accept extra arguments such as --debug and --verbose

Does the Pages job also need this functionality? It would be _MKDOCS_EXTRA because mkdocs is the command being run.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Component

gitlab-ci

Created by

🇬🇧United Kingdom jonathan1055

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @jonathan1055
  • 🇪🇸Spain fjgarlin

    Good suggestion. Yeah, let's go ahead with _MKDOCS_EXTRA as that's the tool we are using for that job.

  • 🇬🇧United Kingdom jonathan1055

    First commit pushed. We could use the downstream pipelines to test PHPStan and Nightwatch, but we do not have a Pages job yet - will be done in 📌 Add documentation .md files to test the pages job Active

    I did notice that the variables.yml file has lots of words in the descriptions in backticks implying "code" formatting. These do not get rendered as anything special in the Run Pipeline UI form, see attached. Is there anywhere else that this file is displayed/rendered where those backticks are actually useful? Or maybe they signify something even without any different rendering.

  • 🇪🇸Spain fjgarlin

    Remember that we can pass variables to the downstream pipelines from the current MR, so you can test the pages argument with "keycdn".

    The MR looks good already. Once we have a test for each we can set RTBC.
    Downstream pipelines: https://git.drupalcode.org/issue/gitlab_templates-3517992/-/pipelines/46...

    And no reason for the backticks in the "description" values other than we did it like that, but happy to change to double quotes if needed. We have yml validation so it should be safe to do. Tho there are a lot of places where we use them, so maybe on a separate follow-up issue to isolate features.

  • Pipeline finished with Success
    about 1 month ago
    Total: 1264s
    #469306
  • Pipeline finished with Failed
    about 1 month ago
    #469395
  • Pipeline finished with Failed
    about 1 month ago
    #469396
  • 🇬🇧United Kingdom jonathan1055

    Remember that we can pass variables to the downstream pipelines

    Yes absoluetly, I'd not forgotten that. But I had forgotten that KeyDCN has a pages job, so thank's for the tip.

    Regarding the backticks, I was thinking we would just delete them if not serving any rendering process. But if you still want quotes of some sort around those words then let's leave them as backticks, as they are clean an unobtrusive, and they do imply a 'code' word even if not rendered. Double-quotes would have a different kind of meaning.

  • 🇬🇧United Kingdom jonathan1055

    I tried the folllowing, to add the EXTRA variable just for one variant

    '→ GTD D10 Plus':
      extends: .downstream-base
      trigger:
        strategy: depend
        project: project/gitlab_templates_downstream
        branch: d10-plus
      'phpstan (max PHP version)':
        variables:
          _PHPSTAN_EXTRA: --debug
      'nightwatch (max PHP version)':
        variables:
          _NIGHTWATCH_EXTRA: --verbose
    

    But the pipeline produced the following error

    jobs:→ gtd d10 plus config contains unknown keys: phpstan (max php version), nightwatch (max php version)
    

    Oh well, it was a guess but I had a hunch it would not work. So it means setting the variable for all variants (unless you know of a better syntax?)

  • Pipeline finished with Success
    about 1 month ago
    Total: 168s
    #469402
  • Pipeline finished with Success
    about 1 month ago
    Total: 51s
    #469432
  • Pipeline finished with Success
    about 1 month ago
    Total: 53s
    #469445
  • 🇪🇸Spain fjgarlin

    Yeah, I think it's only possible to pass down global variables, not per job.

    KeyCDN: https://git.drupalcode.org/issue/gitlab_templates-3517992/-/pipelines/46...

    The MR looks good to me and the documentation additions are great too. Marking RTBC unless you were expecting to run any more tests.

  • Pipeline finished with Success
    about 1 month ago
    Total: 92s
    #470015
  • 🇬🇧United Kingdom jonathan1055

    Thanks for running KeyCDN, the --verbose works as intended.

    I've just updated the Pages doc page, probably after you marked this RTBC. Here's the updated one. I know that the changes to the documentation are more than just adding this extra variable. I have been making notes on each documentation page, and when a change is needed I've been bringing them into alignment with a standard style. I will put more details in the documentation issue summary.

    I am guessing that we do not want to have these three _EXTRA variables set permanently for the downstream pipeline definitions, so I will remove them.

  • Pipeline finished with Success
    about 1 month ago
    Total: 51s
    #470038
  • 🇬🇧United Kingdom jonathan1055

    I've removed the test values for the downstream jobs. No more tests, so this is still RTBC if you are ok with the Pages doc changes.

  • Pipeline finished with Skipped
    about 1 month ago
    #470092
  • 🇪🇸Spain fjgarlin

    It looks perfect. Thanks for bringing these variables for these jobs. Merged!

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024