jenkinsci / build-time-blame-plugin

A Jenkins plugin for analyzing the historical console output of a Job with the goal of determining which steps are taking the most time.
https://plugins.jenkins.io/build-time-blame/
MIT License
29 stars 9 forks source link

Add Ability to Change and Set Defaults for Build Time Blame Configuration #64

Open Starwolf-001 opened 5 months ago

Starwolf-001 commented 5 months ago

The Problem

A major problem I found using this plugin is the inability to set universal defaults for the Build Time Blame Report Plugin. Whether that be universally defined configuration across all jobs on Jenkins or the ability to define for each job, including Multi-branch pipeline jobs, on Jenkins. The latter I prefer.

Why Request This?

An excellent example of the above being an issue is the default select all builds for generating a report. By default I wish to set the Maximum Builds To Process to 50 across all of my jobs on Jenkins. Why? Where I work we have actively been developing various projects/products. Over time the number of releases and builds has exceeded hundreds of builds for the develop branch across for various projects. In my case this results in having to wait 30 minutes to load one specific Jenkins job's develop branch to produce the default Build Time Blame Report. 500 builds verse 50 builds is a major difference in load time in this case.

I also see providing customization like this would benefit Jenkins administrators that are actively running, maintaining and upgrading their Jenkins controllers to acknowledge and utilize a plugin like this. I assume a feature like this would make this plugin more popular and widely used.

The Feature Requested

There's a few things I'd personally like to see here. I'll define the major feature request in this section.

  1. I would like to see a way for a Jenkins Administrator to be able to define in the Jenkins' configuration and a Jenkins Job's configuration default Build Time Blame Report configuration values. This way when someone generates a report for a job or a report for a branch within a multi-branch pipeline job the json config file used to define the configuration uses the settings the Jenkins admin sets. Not the defaults this plugin has defined.

The Feature Requested with Extras

I personally would also like the following considered to help expand customizing defined configuration by integrating with other plugins.

  1. If the ability to define default report configuration is available in the Jenkins configuration to universally define all jobs; I'd like to see this plugin integrate with CasC (Configuration as Code) plugin. This way developers like myself can define report configuration like Maximum Builds To Process in code when we build and deploy a Jenkins controller from code.
  2. If the ability to define default report configuration is available for a Jenkins job; I'd like to see this plugin integrate with the jobdsl plugin. This way developers like myself can define report configuration like Maximum Builds To Process and Regex Search Key patterns for each job in code when we build and deploy a Jenkins controller and generate jobs from code.

Additional Note

I personally see this plugin as extremely helpful way to monitor and report issues to various developers and management in teams/companies. The tables, regex configuration and graph generation is amazing. I personally just wish to see better customization and the ability for me and my team to define and integrate this plugin into the JobDSL and CasC plugins if possible.

LTegtmeier commented 4 months ago

I would like to see a way for a Jenkins Administrator to be able to define in the Jenkins' configuration and a Jenkins Job's configuration default Build Time Blame Report configuration values. This way when someone generates a report for a job or a report for a branch within a multi-branch pipeline job the json config file used to define the configuration uses the settings the Jenkins admin sets. Not the defaults this plugin has defined.

Thanks for the feedback!

That's a reasonable feature and I think I know enough of Jenkins to add that page without much effort. I'll start working on that.

  1. ... I'd like to see this plugin integrate with CasC (Configuration as Code) plugin
  2. ... I'd like to see this plugin integrate with the jobdsl plugin

Those sound like great features too!

I haven't been actively using Jenkins for a while but, I'm definitely in favor of managing CI configuration as code.

I don't know those features in Jenkins well enough to commit to integrating with them. I'd happily review PR(s) adding either of them. When I implement the admin page, I'll add the "help wanted" label and keep this issue open.

I personally see this plugin as extremely helpful way to monitor and report issues to various developers and management in teams/companies. The tables, regex configuration and graph generation is amazing.

I'm glad it's working so well for you!