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_graphandgems:testno longer checkGLCI_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.ymlis deleted, with the static lists that include it:.gitlab/ci/gitlab-gems.gitlab-ci.ymland.gitlab/ci/vendored-gems.gitlab-ci.yml. Thegems <name>trigger jobs in the root pipeline go away. -
A new gem needs only its own
.gitlab-ci.yml. The generator finds every gem ingems/andvendor/gems/that has one. The docs (doc/development/gems.md,gems/README.md,vendor/gems/README.mdand.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:testalso needssetup-test-env, as an optional need. Thegitlab-git2gem, whichmasteradded, starts Gitaly from the artifacts of that job. The deleted template gave the trigger job of that gem this need through aneedsinput. -
The rails-next schedule rule that
masteradded to the template (bfb0b760) moves to.gems:rules:dependency-graph. It setsGLCI_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
- Merge this MR.
- Unset
GLCI_GEMS_DEPENDENCY_GRAPHin the project CI/CD settings.
Related issues
- #630714 (closed)
- Follow-up of !259323 (merged) and !259379 (closed)
Checklist
Pre-merge
- Different pipeline types: the rules of
gems:dependency_graphandgems:testare 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
- Unset
GLCI_GEMS_DEPENDENCY_GRAPHin the project CI/CD settings. - Consider communicating these changes to the broader team following the communication guideline for pipeline changes