Skip to content

Commit

Permalink
[FIXED JENKINS-14154] Allows to access other plugins.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Sep 21, 2014
1 parent 1a77ddb commit fd22c9c
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -47,6 +47,9 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import jenkins.model.Jenkins;

import org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted;
import org.jenkinsci.plugins.scriptsecurity.scripts.ApprovalContext;
Expand Down Expand Up @@ -347,8 +350,7 @@ public final boolean perform(final AbstractBuild<?, ?> build, final Launcher lau
case 2: scriptFailureResult = Result.FAILURE; break;
}
BadgeManager badgeManager = new BadgeManager(build, listener, scriptFailureResult);
// Could use PluginManager.uberClassLoader, though probably unnecessary since most calls would go through badgeManager.
ClassLoader cl = getClass().getClassLoader();
ClassLoader cl = Jenkins.getInstance().getPluginManager().uberClassLoader;
Binding binding = new Binding();
binding.setVariable("manager", badgeManager);
try {
Expand Down

0 comments on commit fd22c9c

Please sign in to comment.