Skip to content
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

Avoid streaming to 2 similar OutputStreams #356

Merged
merged 1 commit into from
Jul 11, 2018
Merged

Avoid streaming to 2 similar OutputStreams #356

merged 1 commit into from
Jul 11, 2018

Conversation

yahavi
Copy link
Contributor

@yahavi yahavi commented Jul 8, 2018

I have an issue when running launcher.launch().stdout(listener) from a different plugin.

Background:
ContainerExecDecorator decorates the launcher.

The issue:
ContainerExecDecorator's doLaunch() gets an OutputStream and splits the output to both the OutputStream and launcher's logger. In my case, OutputStream and and launcher's logger are the same.
Expected: All lines printed properly in job's log
Actual: Lines are printed twice in job's log

Reconstruction:
Run this line inside a pod:

container('maven') {
    rtMaven.run pom: 'maven-example/pom.xml', goals: 'clean install', buildInfo: buildInfo
}

@carlossg carlossg merged commit 6f5db53 into jenkinsci:master Jul 11, 2018
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.

2 participants