is there any event possible when build is finished?


On 7 January 2014 23:33, Jesse Glick <notifications@github.com> wrote:

> In src/main/java/hudson/plugins/mercurial/HgExe.java:
>
> > +                    catch (InterruptedException e) {
> > +                        throw new IOException(e);
> > +                    }
> > +                    FileOutputStream fo = new FileOutputStream(path);
> > +                    try {
> > +                        fo.write(key.getBytes());
> > +                    }
> > +                    finally {
> > +                        fo.close();
> > +                    }
> > +                    return path;
> > +                }
> > +            };
> > +            Launcher launcher = node.createLauncher(listener);
> > +            // Get a "channel" to the build machine and run the task there
> > +            String fileName = launcher.getChannel().call(task);
>
> Works. A little awkward—usually you can avoid the Callable by using
> Node.getRootPath and then using only FilePath methods—though in this case
> you would need to use a Callable to do the deleteOnExit anyway.
>
> (Unless you figure out how to delete the file after the command runs. I am
> still nervous about this temp file with someone’s private key sitting
> around indefinitely on the slave node.)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/jenkinsci/mercurial-plugin/pull/48/files#r8709663>
> .
>



-- 
Anatoly Bubenkov