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

Doesn't handle ANSI colors #607

Open
TobiX opened this issue Mar 21, 2024 · 2 comments
Open

Doesn't handle ANSI colors #607

TobiX opened this issue Mar 21, 2024 · 2 comments

Comments

@TobiX
Copy link

TobiX commented Mar 21, 2024

What feature do you want to see added?

It would be nice if the STDOUT/STDERR snippets in test error views would get the same treatment as the console of the job, so plugins like AnsiColor could work. If this isn't viable, it would be nice if the output could be stripped of ANSI ESC sequences at least...

Upstream changes

No response

Are you interested in contributing this feature?

Maybe.

@timja
Copy link
Member

timja commented Mar 24, 2024

could you provide steps to reproduce please?

@TobiX
Copy link
Author

TobiX commented Mar 25, 2024

Of course, here is a project showing this issue: https://github.com/TobiX/test-renovate-stuff/tree/log4j-ansi-test

You can use the following pipeline:

pipeline {
    agent any

    stages {
        stage('Build') {
            steps {
                git url: 'https://github.com/TobiX/test-renovate-stuff.git', branch: 'log4j-ansi-test'
                sh "mvn -Dmaven.test.failure.ignore=true clean package"
                // bat "mvn -Dmaven.test.failure.ignore=true clean package"
            }

            post {
                success {
                    junit '**/target/surefire-reports/TEST-*.xml'
                }
            }
        }
    }
}

(Adapted from the "Maven+GitHub" example pipeline)

Slightly redacted surefire report XML

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

No branches or pull requests

2 participants