Skip to content

Conversation

@lne3
Copy link
Contributor

@lne3 lne3 commented Aug 12, 2016

JENKINS-37341

  • under z/OS convert input and output files of sh to/from IBM1047
  • on other platforms do not convert as before

* under z/OS convert input and output files of sh to/from IBM1047
* on other platforms do not convert as before
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

s = "#!"+defaultShell+" -xe\n" + s;
}
shf.write(s, "UTF-8");
shf.write(s, encoding==null ? "UTF-8" : encoding);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we not just want to use the system encoding on the agent, regardless of OS?

Copy link
Contributor Author

@lne3 lne3 Feb 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@katonica
Copy link

katonica commented Apr 7, 2017

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!

@lne3
Copy link
Contributor Author

lne3 commented Apr 12, 2017

@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.

@charliegracie
Copy link

We are also now running into this issue. Is there still a chance that this issue will be resolved?

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be reëxamined after #61.

@mad8vad
Copy link

mad8vad commented Jun 7, 2018

I'm also now running into this issue

@RamchandV
Copy link

Any idea when is this getting resolved. I want this change to get my pipeline going :(

@gorbadoc
Copy link

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?

@dwnusbaum
Copy link
Member

Superseded by #80, which was merged recently and will be available in the next release.

@dwnusbaum dwnusbaum closed this Jan 31, 2019
@ghost
Copy link

ghost commented Aug 27, 2019

I just ran into this issue and found that the fix does NOT work on intel Jenkins servers. Just Unix based systems....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants