CI/CD catalog seeder creates no releases, so seeded resources are unusable

gitlab:seed:ci_catalog_resources creates catalog resources but never releases them. Every seeded resource shows as Unreleased, so a seeded GDK cannot exercise most of the catalog UI.

Steps to reproduce

bundle exec rake "gitlab:seed:ci_catalog_resources[flightjs, 25]"

Then open /explore/catalog.

What happens

  • Every row shows the Unreleased badge and no "Published by" line.
  • On a resource detail page, the version selector reads No versions available.
  • The Components tab shows Component details not available.
  • Ci::Catalog::Resources::Version.count is 0.

The seeder does write a README.md and a templates/component.yml with a spec: block, so the content exists in the repository. It is only the release that is missing, and component metadata is built from a release.

Why it matters

The seeder is the documented way to get catalog data into a GDK. Without versions, none of these can be checked locally: the version dropdown, component metadata and the inputs table, the rendered README tab, the released-version badge, or the "Published by" line. This blocked a Vue 3 migration verification for the catalog page until releases were created by hand.

Suggested fix

After create_readme and create_template_yml, create a release. Releases::CreateService already calls Ci::Catalog::Resources::ReleaseService with metadata: nil (app/services/releases/create_service.rb:64), which builds the version and its components from the repository.

This worked:

Releases::CreateService.new(
  project, user,
  tag: 'v1.0.0', ref: project.default_branch,
  name: 'Release v1.0.0', description: '...'
).execute

Seeding a couple of resources with more than one tag would also make the version selector testable.

Two smaller points found alongside this:

  • Gitlab::Seeders::Ci::Catalog::ResourceSeeder#create_project calls project.saved? on the result of Projects::CreateService#execute, which can be nil. That raises NoMethodError: undefined method 'saved?' for nil and hides the real error, which is logged separately as Unable to save project. Error: .... A nil guard would surface the cause.
  • The rake task itself has no CI coverage. spec/lib/gitlab/seeders/ci/catalog/resource_seeder_spec.rb unit-tests the seeder class, and db:seed_fu in CI runs the db/fixtures/development/ seeders, but nothing runs gitlab:seed:ci_catalog_resources end to end.