-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store data on Global Shared Library usage #102
base: master
Are you sure you want to change the base?
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
src/main/java/org/jenkinsci/plugins/workflow/cps/global/UserDefinedGlobalVariable.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/workflow/cps/global/UserDefinedGlobalVariableAction.java
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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_shared resolve 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.