Add Ci Catalog graphql query
What does this MR do and why?
In the series of MR to build the CI/CD catalog, we now fetch catalog resources and pass it down to the list component to render them. We also handle pagination and have a series of tests to make sure that we are getting what we expect in term of resources. To note that we are also removing mock data that we were using behind the disabled FF.
Screenshots or screen recordings
Before | After |
---|---|
Screen_Recording_2023-04-11_at_1.47.48_PM | Screen_Recording_2023-04-05_at_9.10.26_AM |
How to set up and validate locally
- Make sure you have an ultimate license for your GDK
- Enable the feature flag:
ci_private_catalog_beta
- Login as a user
- Create a few projects that you will be able to convert to Ci resources (ideally 20+).
- Once you have done so, get the ID of the first new project you wanted to convert. Then in Rails console, run:
projects = Project.where("id > ?", your_first_project_id)
projects.each do |project|
project.update!(description: 'description')
::Ci::Catalog::Resource.new(project_id: project.id).save
end
- Navigate to
/$namespace/$project/-/ci/catalog/resources
- Notice that you land on the catalog page
- Notice that you can see each catalog resource!
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Frédéric Caplette