Skip to content

Store data on Global Shared Library usage#102

Open
j3p0uk wants to merge 4 commits into
jenkinsci:masterfrom
j3p0uk:track_shared
Open

Store data on Global Shared Library usage#102
j3p0uk wants to merge 4 commits into
jenkinsci:masterfrom
j3p0uk:track_shared

Conversation

@j3p0uk

@j3p0uk j3p0uk commented Nov 2, 2020

Copy link
Copy Markdown

When a global shared library function is invoked add to an action so that
the data can be found at a later date.

@j3p0uk

j3p0uk commented Nov 4, 2020

Copy link
Copy Markdown
Author

@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!

@j3p0uk

j3p0uk commented Jan 25, 2021

Copy link
Copy Markdown
Author

@dwnusbaum dwnusbaum left a comment

Copy link
Copy Markdown
Member

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.

@j3p0uk

j3p0uk commented Feb 1, 2021

Copy link
Copy Markdown
Author

@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.

j3p0uk and others added 4 commits May 31, 2021 10:09
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
@j3p0uk

j3p0uk commented May 31, 2021

Copy link
Copy Markdown
Author

@dwnusbaum does your change in #107 suggest any changes here?


public Api getApi() { return new Api(this); }

public static class UserDefinedGlobalVariableData {

Copy link
Copy Markdown
Member

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.

@jglick

jglick commented May 23, 2022

Copy link
Copy Markdown
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants