EDIT: wrong code for (action in build.getAllActions()) { 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 MilestoneAction)) 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. -- 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/9238caf0-eace-4005-b900-ccd0e6f91ebf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.