-
Notifications
You must be signed in to change notification settings - Fork 96
[JENKINS-37341] z/OS Unix System Services enablement #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
35a2b90
8fedff4
c413ac2
2721dfb
65dc605
6f603f7
2d360e1
68b5f90
d9af4b1
492496d
9a5fc62
07c9f74
5b8a95c
4419207
19b6b47
031f94f
9b5353a
c0bfbca
70e3bce
b86fa3e
866ac67
cee1ff2
d787e74
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ | |
| import hudson.remoting.VirtualChannel; | ||
| import hudson.slaves.WorkspaceList; | ||
| import hudson.util.StreamTaskListener; | ||
| import hudson.Platform; | ||
| import java.io.File; | ||
| import java.io.IOException; | ||
| import java.io.OutputStream; | ||
|
|
@@ -180,6 +181,7 @@ protected FileMonitoringController(FilePath ws) throws IOException, InterruptedE | |
| CountingOutputStream cos = new CountingOutputStream(transcodedSink); | ||
| try { | ||
| log.act(new WriteLog(lastLocation, new RemoteOutputStream(cos))); | ||
| sink.flush(); | ||
|
||
| return cos.getByteCount() > 0; | ||
| } finally { // even if RemoteOutputStream write was interrupted, record what we actually received | ||
| transcodedSink.flush(); // writeImmediately flag does not seem to work | ||
|
|
@@ -223,13 +225,15 @@ private static class TranscodingCharsetForSystemDefault extends MasterToSlaveCal | |
| } | ||
|
|
||
| /** Avoids excess round-tripping when reading status file. */ | ||
| static class StatusCheck extends MasterToSlaveFileCallable<Integer> { | ||
| /* replaced static class STATUS_CHECK with anonymous to capture charset */ | ||
| final MasterToSlaveFileCallable<Integer> STATUS_CHECK_INSTANCE = new MasterToSlaveFileCallable<Integer>() { | ||
jglick marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| @Override | ||
| @CheckForNull | ||
| public Integer invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { | ||
| if (f.exists() && f.length() > 0) { | ||
| try { | ||
| String fileString = Files.readFirstLine(f, Charset.defaultCharset()); | ||
| Charset cs = transcodingCharset(charset); | ||
|
||
| String fileString = Files.readFirstLine(f, cs == null ? Charset.defaultCharset() : cs ); | ||
| if (fileString == null || fileString.isEmpty()) { | ||
| return null; | ||
| } else { | ||
|
|
@@ -246,9 +250,7 @@ public Integer invoke(File f, VirtualChannel channel) throws IOException, Interr | |
| } | ||
| return null; | ||
| } | ||
| } | ||
|
|
||
| static final StatusCheck STATUS_CHECK_INSTANCE = new StatusCheck(); | ||
| }; | ||
|
|
||
| @Override public Integer exitStatus(FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException { | ||
| FilePath status = getResultFile(workspace); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.