Should that be "indeterminate result" instead of "intermediate result"?
-- Dean On 3/21/12 8:50 AM , "Kohsuke Kawaguchi" <[email protected]> wrote: > > The javadoc of getResult() says: > > /** > * Returns the build result. > * > * <p> > * When a build is {@link #isBuilding() in progress}, this method > * returns an intermediate result. > */ > > And so I claim this isn't a bug. > > If you'd like to just get a callback when a build is done, > RunListener.onCompleted or RunListener.onFinalized are good places. > > > On 03/20/2012 05:23 PM, Max Spring wrote: >> I have a BuildWrapper. The build parameter in its tearDown() method gives >> null as build result. >> >> public Environment setUp(AbstractBuild build, Launcher launcher, >> BuildListener listener) throws InterruptedException { >> return new Environment() { >> @Override >> public boolean tearDown(AbstractBuild build, BuildListener listener) >> throws IOException, InterruptedException { >> System.out.println("build.getResult() -> "+build.getResult()); >> return true; >> } >> }; >> } >> >> I thought tearDown() gets called after the build finished, so it should have >> a result. >> >> What's the right way to get a hold of a result, after a build finished? >> >> Thanks! >> -Max >> >
