Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
<properties>
<revision>2.22</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.62</jenkins.version>
<jenkins.version>2.73.3</jenkins.version>
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated, but easier to remember LTS baselines.

Copy link
Member

Choose a reason for hiding this comment

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

Let's not bump the baseline unless there's a need to - this limits who can take advantage of new plugin releases.

Copy link
Member Author

Choose a reason for hiding this comment

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

Bumped only to the nearest LTS line. There is no reason for anyone to still be using intermediate weeklies. If they are, they need to update.

<java.level>8</java.level>
<no-test-jar>false</no-test-jar>
<workflow-support-plugin.version>2.17</workflow-support-plugin.version>
<scm-api-plugin.version>2.1.1</scm-api-plugin.version>
<workflow-support-plugin.version>2.19-rc287.918f5958551d</workflow-support-plugin.version> <!-- TODO https://github.com/jenkinsci/workflow-support-plugin/pull/56 -->
<scm-api-plugin.version>2.2.6</scm-api-plugin.version>
Copy link
Member

Choose a reason for hiding this comment

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

Why?

Copy link
Member Author

Choose a reason for hiding this comment

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

Something in the transitive deps needs it.

<git-plugin.version>3.2.0</git-plugin.version>
<jenkins-test-harness.version>2.33</jenkins-test-harness.version>
</properties>
Expand Down Expand Up @@ -104,7 +104,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.7</version>
<version>1.10</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
Expand Down Expand Up @@ -229,7 +228,7 @@ StreamBuildListener getListener() {
if (listener == null) {
try {
OutputStream logger = new FileOutputStream(getLogFile(), true);
listener = new StreamBuildListener(logger, Charset.defaultCharset());
listener = new StreamBuildListener(logger, getCharset());
} catch (FileNotFoundException fnf) {
LOGGER.log(Level.WARNING, "Error trying to open build log file for writing, output will be lost: "+getLogFile(), fnf);
return NULL_LISTENER;
Expand Down Expand Up @@ -281,6 +280,7 @@ public WorkflowRun(WorkflowJob job, File dir) throws IOException {
}
try {
onStartBuilding();
charset = "UTF-8"; // cannot override getCharset, and various Run methods do not call it anyway
StreamBuildListener myListener = getListener();
myListener.started(getCauses());
Authentication auth = Jenkins.getAuthentication();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,12 @@ private void assertCulprits(WorkflowRun b, String... expectedIds) throws IOExcep
}
}

@Issue("JENKINS-31096")
@Test public void unicode() throws Exception {
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
String message = "¡Čau → there!";
p.setDefinition(new CpsFlowDefinition("echo '" + message + "'", true));
r.assertLogContains(message, r.buildAndAssertSuccess(p));
Copy link
Member Author

Choose a reason for hiding this comment

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

On Windows (ISO-8859-1), this fails with mojibake with the charset = "UTF-8" line commented out, or with the upstream PR not integrated.

}

}