jenkinsjenkins-pluginsjenkins-cli

Jenkins How to check which jobs are consuming a file from Config File Provider?


There are around 3 files inside Config Files ($JENKINS_URL/configfiles/) which are consumed by approximately 500 of 2000 jobs in my Jenkins instance. I am trying to find the 500 jobs which will be impacted if I make a change on a config file. Is there any way to categorize the files and jobs?

I tried using the Configuration Slicer plugin but that was not able to provide this information. Clicking on each job and navigating through the configuration is proving to be cumbersome. Thanks.


Solution

  • Plugin Usage plugin is probably a more suitable tool than Configuration Slicing.

    It does not fully scan pipeline, only freestyle.
    Update 2023-01-09: As of version 4.0, "Adds analyzer for pipelines (scripted and declarative) based on last runs".
    It also nicely reports on job specific plugin vs global and system plugin usage.

    Or you can just grep the job config.xml for the plugin string plugin="config-file-provider and your Jenkinsfile for configFileProvider. Or scan w/groovy.

    If you are also using Managed Scripts plugin, then also scan for managed-scripts