[JENKINS-37341] allow sh step to execute under z/OS USS sh#28
[JENKINS-37341] allow sh step to execute under z/OS USS sh#28lne3 wants to merge 1 commit intojenkinsci:masterfrom
Conversation
* under z/OS convert input and output files of sh to/from IBM1047 * on other platforms do not convert as before
jglick
left a comment
There was a problem hiding this comment.
Idea looks right but will probably need to be generalized and reconciled with other changes.
| } | ||
|
|
||
| ShellController c = new ShellController(ws); | ||
| String encoding = ws.act(new ZosCheck()) ? "IBM1047" : null; |
There was a problem hiding this comment.
Seems OK though may clash with the higher-priority #33.
| @Override public final boolean writeLog(FilePath workspace, OutputStream sink) throws IOException, InterruptedException { | ||
| FilePath log = getLogFile(workspace); | ||
| if (this.getEncoding() != null) { | ||
| sink = new WriterOutputStream(new OutputStreamWriter(sink, "UTF-8"), this.getEncoding()); |
There was a problem hiding this comment.
This is probably superseded by encoding fixes in #29.
| @Override public byte[] getOutput(FilePath workspace, Launcher launcher) throws IOException, InterruptedException { | ||
| // TODO could perhaps be more efficient for large files to send a MasterToSlaveFileCallable<byte[]> | ||
| return IOUtils.toByteArray(getOutputFile(workspace).read()); | ||
| return this.getEncoding() == null ? |
| s = "#!"+defaultShell+" -xe\n" + s; | ||
| } | ||
| shf.write(s, "UTF-8"); | ||
| shf.write(s, encoding==null ? "UTF-8" : encoding); |
There was a problem hiding this comment.
Would we not just want to use the system encoding on the agent, regardless of OS?
There was a problem hiding this comment.
For various reasons (e.g. JENKINS-13091) we might be in a situation that the agent does not run with the systems default encoding, i.e. the –Dfile.encoding=… jvm parameter changing it to something else. Therefore system default encoding might be a good default. However, it should be possible to set the encoding explicitly since the required script file encoding (IBM1047 on z/OS) does not necessarily match the encoding set by –Dfile.encoding.
|
Hello, I am a few months into a project where we are now required to make use of Jenkins slaves running on z/OS. We are attempting to use pipelines. I took the jenkins slave from http://yourserver:port/jnlpJars/slave.jar and started it on my z/OS system and I was able to get it to connect using the -Dfile.encoding=ISO8859-1 setting. I then ran into this same defect as described above. I was able to rebuild the durable-task-plugin, using the code fix by lne3, and it fixed my problem. It would be great if this could make it into a release. Thanks! |
|
@katonica, thanks for the update. Unfortunately, I had myself no time to spare so far for reviewing the fix with respect to the changes in durable-task-1.13 and its dependencies. |
|
We are also now running into this issue. Is there still a chance that this issue will be resolved? |
|
I'm also now running into this issue |
|
Any idea when is this getting resolved. I want this change to get my pipeline going :( |
|
Doesn't this change have exactly the same goal as z/OS Unix System Services enablement #80? Can this change be abandoned in favor of @OldNavi's change? What would it take to get #80 merged? |
|
Superseded by #80, which was merged recently and will be available in the next release. |
|
I just ran into this issue and found that the fix does NOT work on intel Jenkins servers. Just Unix based systems.... |
JENKINS-37341