Add deployment frequency charts to CI/CD Analytics page
What does this MR do?
Adds new "deployment frequency" charts to the project-level CI/CD Analytics page.
These new charts are visible if:
- The project is on Gold/Ultimate
- The user has at least reporter permissions for the project
- The
deployment_frequency_charts
feature flag is not disabled
In order for deployments to show on these graphs, the environment must be named production
.
Screenshots
Feature flag
This feature is hidden behind a feature flag named deployment_frequency_charts
which is disabled by default.
Rollout issue: #296893.
MR to enable the feature flag by default: !51338 (merged)
Testing locally
To create data for this graph locally, drop into the Rails console (rails c
) and run the following:
p = Project.find(<your local project's ID here>)
e = Environment.find(<your local production environment's ID here>)
sha = '<any SHA from your repo here>'
2000.times do
Deployment.new(project: p, environment: e, status: :success, finished_at: rand(1..100).days.ago, sha: sha, ref: 'master', tag: false).save!
end
Note that the environment must be named production
.
Related to #275991 (closed)
Edited by Nathan Friend