Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

j3p0uk
Copy link

@j3p0uk j3p0uk commented Nov 2, 2020

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

@j3p0uk
Copy link
Author

j3p0uk commented Nov 4, 2020

@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
Copy link
Author

j3p0uk commented Jan 25, 2021

Copy link
Member

@dwnusbaum dwnusbaum left a 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.

@j3p0uk
Copy link
Author

j3p0uk commented Feb 1, 2021

@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
Copy link
Author

j3p0uk commented May 31, 2021

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


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

public static class UserDefinedGlobalVariableData {
Copy link
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
Copy link
Member

jglick commented May 23, 2022

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