Hello,
Trying to write a code that let me dump new file with content over to the
master workspace (while running on a remote Node).
2 things I'm struggling with:
1. How to find out the Master 'FilePath' while running within the Node.
2. How to make sure the code is written such that it will not require the
administrator to change the master security policy (to accept the Node
writing over into it's directoris)
I have the following code I made for this function:
public void writeToMaster(FilePath workspace, OutputStream fileOutput )
throws IOException, InterruptedException {
try (final OutputStream out = new RemoteOutputStream(fileOutput)) {
workspace.act(new Callable<Void,IOException>() {
@Override
public Void call() throws IOException {
// agent is just writing to a pipe to the master. Quite
safe
out.flush();
out.close();
return null;
}
@Override
public void checkRoles(RoleChecker checker) throws
SecurityException {
throw new UnsupportedOperationException("Not supported
yet."); //To change body of generated methods, choose Tools | Templates.
}
});
}
}
I want to think this address my second concern, but still I don't know how
to extract the Master's PathFile from the Run class (or otherwise).
Thanks,
Tal.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/69a16fab-3fe7-4083-a7d4-6fb0de54005fn%40googlegroups.com.