Skip to content

Add shared runners chart for groups/namespaces

What does this MR do and why?

This adds an area chart that specifies the CI minutes used for shared runners in a given group

#340504 (closed)

Screenshots or screen recordings

Screen_Shot_2022-01-17_at_12.13.37

How to set up and validate locally

Note This chart is only visible to groups you have permission to see the Analytics -> CI/CD menu item on the sidebar

  1. Get the group ID for the group you want to see the analytics for, this is available on Group -> Settings
  2. Open the rails console bundle exec rails console and issue the following commands:
group = Group.find(<group_id>)
namespace_usage = Ci::Minutes::NamespaceMonthlyUsage.new(namespace_id: group, date: Date.new(2021, 9, 01), amount_used: 85)
namespace_usage.save

Change the amount_used and the date and repeat the last two steps to include as many months as you want on the chart, warning using the same month and year as the currently running month will throw an error on the console.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jose Ivan Vargas

Merge request reports