Store data on Global Shared Library usage#102
Conversation
|
@dwnusbaum looking to enhance the reporting from the global shared libs. Built/tested/works, and would love to get it approved, or take recommendations for what to do in order to get it merged, thanks! |
dwnusbaum
left a comment
There was a problem hiding this comment.
@j3p0uk Thanks for the PR! I currently have very little time to evaluate changes to OSS Jenkins plugins apart from bug fixes, but in general I think this would be a nice change and the design looks good other than a few issues which I noted in review comments.
All changes requested made, thanks for the pointers, I feel better about the code after that! 👍 Failing test looks unrelated to the changes, as the previously passing revision is also failing in the same way in local testing. Validated that the change still works in testing against jenkins/jenkins:lts docker image. |
When a global shared library function is invoked add to an action so that the data can be found at a later date.
* Add an inner class for library statistics * Remove the Run object in constructor and use CpsScript.$buildNoException() These changes allow serialisation of the UserDefinedGlobalVariableAction and decouple it from changes to UserDefinedGlobalVariable.
Ensure data can be displayed by making the inner class public
|
@dwnusbaum does your change in #107 suggest any changes here? |
|
|
||
| public Api getApi() { return new Api(this); } | ||
|
|
||
| public static class UserDefinedGlobalVariableData { |
There was a problem hiding this comment.
@j3p0uk I would add @ExportedBean to this class and add @Exported to its getter methods, and then in the parent class I would delete apiUserGlobalVars and add @Exported to getUserGlobalVars instead.
|
As of #172 most of the code in this plugin has been moved to another plugin repository so this PR must be closed. If this change is still needed, please git clone https://github.com/jenkinsci/pipeline-groovy-lib-plugin
cd pipeline-groovy-lib-plugin
git checkout -b track_shared
git pull https://github.com/j3p0uk/workflow-cps-global-lib-plugin track_sharedresolve any merge conflicts, and file a fresh PR on the new repository. Be sure to paste a link to this old PR to enable bidirectional navigation. |
When a global shared library function is invoked add to an action so that
the data can be found at a later date.