Hi there, I defined a MilestoneAction class in our shared groovy library, and attached it to jobs through another method in the library via addAction(). When peeking at that specific build from another build through another library method via 'build.getActions(MilestoneAction.class)' that MilestoneAction doesn't appear.
This piece of code from the library: for (action in build.getActions(hudson.model.InvisibleAction.class)) { context.echo "Comparing actions: ${action.getClass().getName()} with ${MilestoneAction.class.getName()}" //if (action.getClass().getName().equals(MilestoneAction.class.getName()))//Ugly, but works if (action instanceof MilestoneClass)) context.echo "It's a milestone!" else context.echo "Not a milestone." Prints this: Comparing actions: com.tsystems.sbs.jenkinslib.types.MilestoneAction with com.tsystems.sbs.jenkinslib.types.MilestoneActionNot a milestone. So it seems that classes defined in the library and attached to a jenkins build are no longer recognized by the library as the original class. I've read maybe this has to do with classloaders? Thank you for your attention. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/004f1530-5f10-44e3-b767-ce831241bbd3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.