Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<properties>
<changelist>999999-SNAPSHOT</changelist>
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.528</jenkins.baseline>
<jenkins.version>2.532</jenkins.version>
<jenkins.baseline>2.555</jenkins.baseline>
<jenkins.version>2.569</jenkins.version>
<no-test-jar>false</no-test-jar>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<hpi.strictBundledArtifacts>true</hpi.strictBundledArtifacts>
Expand All @@ -75,7 +75,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>5577.vea_979d35b_b_ff</version>
<version>6585.va_085f4d47c41</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@
import jenkins.model.Jenkins;
import jenkins.security.CryptoConfidentialKey;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.Beta;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest2;
import org.kohsuke.stapler.StaplerResponse2;

/**
* Some utility code extracted from {@link AnnotatedLargeText} which probably belongs in {@link ConsoleAnnotator} or {@link ConsoleAnnotationOutputStream}.
* @deprecated Use {@link AnnotatedLargeText#writeHtmlToFilter}.
*/
@Restricted(Beta.class)
@Deprecated
public class ConsoleAnnotators {

private static final CryptoConfidentialKey PASSING_ANNOTATOR = new CryptoConfidentialKey(ConsoleAnnotators.class, "consoleAnnotator");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ private void maybeFlush() {
@Override public AnnotatedLargeText<FlowExecutionOwner.Executable> overallLog(@NonNull FlowExecutionOwner.Executable build, boolean complete) {
maybeFlush();
return new AnnotatedLargeText<FlowExecutionOwner.Executable>(log, StandardCharsets.UTF_8, complete, build) {
@Override public long writeHtmlTo(long start, Writer w) throws IOException {
@Override
protected long writeHtmlToFilter(long start, Writer w, ConsoleAnnotationOutputStream<FlowExecutionOwner.Executable> caos) throws IOException {
try (BufferedReader indexBR = index.isFile() ? Files.newBufferedReader(index.toPath(), StandardCharsets.UTF_8) : new BufferedReader(new NullReader(0))) {
ConsoleAnnotationOutputStream<FlowExecutionOwner.Executable> caos = new ConsoleAnnotationOutputStream<>(w, ConsoleAnnotators.createAnnotator(build), build, StandardCharsets.UTF_8);
long r = this.writeRawLogTo(start, new FilterOutputStream(caos) {
return super.writeRawLogTo(start, new FilterOutputStream(caos) {
// To insert startStep/endStep annotations into the overall log, we need to simultaneously read index-log.
// We use the standard LargeText.FileSession to get the raw log text (we need not think about ConsoleNote here), having seeked to the start position.
// Then we read index-log in order, looking for transitions from one step to the next (or to or from non-step overall output).
Expand Down Expand Up @@ -261,8 +261,6 @@ private void maybeFlush() {
super.flush();
}
});
ConsoleAnnotators.setAnnotator(caos.getConsoleAnnotator());
return r;
}
}
};
Expand Down
Loading