/** * May be overridden but this will only take effect when used as a {@link BuildWrapper} on an {@link AbstractProject}. * <p>{@inheritDoc} * @since 1.608 */ @Override public Launcher decorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, Run.RunnerAbortedException { return super.decorateLauncher(build, launcher, listener); // TODO reasonable to decorate Launcher within a dynamic scope, but this signature does not mix well with Context pattern. // Called from AbstractBuildExecution.createLauncher; how do we track what is decorating what? // Would have to keep something like a LaunchedDecorator, not an actual Launcher, in Context. // And createLauncher is called before even preCheckout, so much too early for the Context to have been prepared. // Could perhaps create a proxy Launcher whose launch method checks some field in the Context remembered for the build. }
/** * May be overridden but this will only take effect when used as a {@link BuildWrapper} on an {@link AbstractProject}. * <p>{@inheritDoc} * @since 1.608 */ @Override public Launcher decorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, Run.RunnerAbortedException { return super.decorateLauncher(build, launcher, listener); // TODO reasonable to decorate Launcher within a dynamic scope, but this signature does not mix well with Context pattern. // Called from AbstractBuildExecution.createLauncher; how do we track what is decorating what? // Would have to keep something like a LaunchedDecorator, not an actual Launcher, in Context. // And createLauncher is called before even preCheckout, so much too early for the Context to have been prepared. // Could perhaps create a proxy Launcher whose launch method checks some field in the Context remembered for the build. }
public Launcher superDecorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, RunnerAbortedException { return super.decorateLauncher(build, launcher, listener); }
@Override public Launcher decorateLauncher(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException, RunnerAbortedException { initPython(); if (pexec.isImplemented(1)) { return (Launcher) pexec.execPython("decorate_launcher", build, launcher, listener); } else { return super.decorateLauncher(build, launcher, listener); } }