Reputation: 177
I am trying to determine what plugins, if any, are currently being used in a number of scripted Jenkins Pipelines, is there a programmatic way to determine this information, or am i going to need to go through every pipeline to look for calls to plugins?
I found this article, but it states that this does not cover pipelines. https://cruftex.net/2015/11/30/Jenkins-Analyze-Your-Plugin-Usage.html
This article also points to https://issues.jenkins-ci.org/browse/JENKINS-31582 which is stated as resolved, but I don't see API documentation on how to get this information still.
The version of Jenkins I'm using is 2.46.1
Upvotes: 10
Views: 1392
Reputation: 4678
This article also points to https://issues.jenkins-ci.org/browse/JENKINS-31582 which is stated as resolved, but I don't see API documentation on how to get this information still.
This was added to Workflow-API plugin, meaning if you would have a job, with name lets say test
, you can get some more result by visiting the following address: http://your_jenins/job/test/12/api/json?pretty=true
. Where 12
should be the job number you are interested with. This plugin is poorly documented though.
The part you are interested in was added to actions
. For example, in my case:
_class "org.jenkinsci.plugins.workflow.job.WorkflowRun"
actions
0
_class "hudson.model.CauseAction"
causes
0 {…}
1 {}
2 {}
3 {}
4 {}
5
_class "org.jenkinsci.plugins.pipeline.modeldefinition.actions.RestartDeclarativePipelineAction"
6 {}
7
_class "org.jenkinsci.plugins.workflow.job.views.FlowGraphAction"
8 {}
9 {}
10 {}
artifacts []
Upvotes: 3