Test the gems from the dependency graph by default

What does this MR do?

This is the last step of the rollout in !259323 (merged). It retires the old gem path, so the gems from the dependency graph are tested by default.

  • gems:dependency_graph and gems:test no longer check GLCI_GEMS_DEPENDENCY_GRAPH. They run on every merge request that changes a gem or the shared gem CI config, and on the maintenance schedule.

  • .gitlab/ci/templates/gem.gitlab-ci.yml is deleted, with the static lists that include it: .gitlab/ci/gitlab-gems.gitlab-ci.yml and .gitlab/ci/vendored-gems.gitlab-ci.yml. The gems <name> trigger jobs in the root pipeline go away.

  • A new gem needs only its own .gitlab-ci.yml. The generator finds every gem in gems/ and vendor/gems/ that has one. The docs (doc/development/gems.md, gems/README.md, vendor/gems/README.md and .ai/ci-cd.md) no longer ask to add the gem to a static list.

  • GLCI_GEMS_TEST_ALL="true" stays, to test all gems on demand.

  • gems:test also needs setup-test-env, as an optional need. The gitlab-git2 gem, which master added, starts Gitaly from the artifacts of that job. The deleted template gave the trigger job of that gem this need through a needs input.

  • The rails-next schedule rule that master added to the template (bfb0b760) moves to .gems:rules:dependency-graph. It sets GLCI_GEMS_TEST_ALL="true", so that schedule still tests all gems.

This MR is independent of !259379 (closed), which runs all selected gems in one child pipeline. They can merge in any order.

Verified with the CI lint API (dry run on this branch, with GLCI_GEMS_TEST_ALL="true" and workflow forced on): the config is valid, gems:dependency_graph and gems:test are created without GLCI_GEMS_DEPENDENCY_GRAPH, and no gems <name> job is left. Not verified: a real pipeline. I pushed with ci.skip.

Rollout

  1. Merge this MR.
  2. Unset GLCI_GEMS_DEPENDENCY_GRAPH in the project CI/CD settings.

Checklist

Pre-merge

  • Different pipeline types: the rules of gems:dependency_graph and gems:test are the same as in !259323 (merged), without the switch.
  • Non-canonical projects (gitlab-foss, security, dev, personal forks): the new jobs now run there too, with the same rules as the old gem jobs had.
  • Pipeline performance: the old gems <name> trigger jobs are removed. Gems that depend on a changed in-repo gem now run too.
  • Add a duration chart to https://app.periscopedata.com/app/gitlab/652085/Engineering-Productivity---Pipeline-Build-Durations if there are new jobs added to merge request pipelines (no new jobs)

Post-merge

Edited by Fabio Pitino

Merge request reports

Loading
Loading