Problem/Motivation
Recently Gitlab CI has been set stable for Core and Contrib projects. All referenced documentation is available at
https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...
After checking the configuration of .gitbal-ci.yml for the examples module, I've noticed it is not working. An example is https://git.drupalcode.org/issue/examples-3376999/-/pipelines/83046 where none changes were introduced on this matter and it failed.
We'd need to review completely the configuration set at .gitlab-ci.yml to have it aligned with latest changes set.
The final goal is having it working for this project.
Proposed resolution
- Replace the current .gitlab-ci.yml with the current template available on https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/gitlab-....
- Starting from there, include any additional custom configuration needed for the project until we make it work for this project.
Issue fork examples-3417410
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jlbellidoI worked on this issue as part of the #ContributionWeekend2024 https://groups.drupal.org/node/537003
Comment #4
jlbellidoAfter a first run with the new gitlab-ci.yml configuration it seems it is working again (https://git.drupalcode.org/issue/examples-3417410/-/pipelines/83155).
However I see a tons of errors on the validation area and the tests, it might be caused by the new configuration or, since the last run was done 10 months ago, it might be the case that they are real issues not related with the configuration. Given this, I think these are the following steps:
Comment #5
jlbellidoAfter checking carefully the previous version and the defaults from https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/include... I don't see big differences out of setting 'allow_failure:true' for the phpunit Test job.
Therefore I'm moving this issue to "Needs Review" and opening a new follow-up issue for fixing everything found on the validation checks and current errors on the Tests with the final goal of having this project passing the pipelines successfully with it is current state.
Thanks to @fjgarlin (https://www.drupal.org/u/fjgarlin) for his support during the process.
Cheers
Comment #6
fjgarlin commentedI've reviewed what was before (old initial-alpha-phase templates) vs what's now (new recommended templates) and they look good.
The warnings on the different jobs (phpcs, phpstan, phpunit...) were there before, so this is not introducing any errors that weren't there already. The errors also show in the DrupalCI runs so it validates the previous sentence too.
Agree that fixes to each job should be tackled on separate issues, so I'm marking this RTBC.
If GitLab CI is used, DrupalCI could be disabled to save resources.
Comment #7
jlbellidoI've created the following follow up tasks
We still have pending to create follow up tasks for:
We will need to create more tasks to fix other issues we have currently with the final goal of having everything in green.
Comment #8
valthebaldCommitted, thanks everyone!