Skip to content

Add support to seed all package types

David Fernandez requested to merge 10io-seed-data-for-all-package-managers into master

What does this MR do?

This MR add support for seeding packages of all types during rake setup.

This MR changes the following:

  • Adds a print statement so that when seeding packages, the target project is logged.
  • Adds a SEED_ALL_PACKAGE_TYPES that, when set, will seed packages of all available types to it instead of only seeding npm packages.

See #39118 (closed)

Screenshots

Default usage

$ rake setup

output [truncated]:

== Seed from ee/db/fixtures/development/26_packages.rb
Use the `SEED_ALL_PACKAGE_TYPES` environment variable to seed packages of all types.

Seeding packages for the 'gitlab-org/gitlab-test' project
.....
Seeding packages for the 'adrienne.bode/gitlab-shell' project
.....
Seeding packages for the 'reported_user_13/gitlab-shell' project
.....
Seeding packages for the 'flightjs/flight' project
.....
Seeding packages for the 'reported_user_11/gitlab-shell' project
.....
OK

in the UI: Screenshot_2020-01-16_at_11.51.45

With SEED_ALL_PACKAGE_TYPES flag

$ SEED_ALL_PACKAGE_TYPES=1 rake setup

output [truncated]:

== Seed from ee/db/fixtures/development/26_packages.rb

Seeding packages for the 'reported_user_17/typeahead-js' project
....................
Seeding packages for the 'reported_user_3/typeahead-js' project
....................
Seeding packages for the 'flightjs/flight' project
....................
Seeding packages for the 'jashkenas/underscore' project
....................
Seeding packages for the 'Commit451/lab-coat' project
....................
OK

in the UI: Screenshot_2020-01-16_at_11.40.01

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by David Fernandez

Merge request reports

Loading