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

Missing support for colored pipeline stages #104

Closed
JoeMerten opened this issue Mar 23, 2017 · 5 comments
Closed

Missing support for colored pipeline stages #104

JoeMerten opened this issue Mar 23, 2017 · 5 comments
Labels
feature request ✨ New feature to be added wontfix

Comments

@JoeMerten
Copy link
Collaborator

JoeMerten commented Mar 23, 2017

Test environment

  • Jenkins Versions: 1.653 and 2.32.3
  • Pipeline Version: 2.5
  • Build Pipeline Plugin Version: 1.5.6
  • AnsiColor Plugin Version: 0.5.0
  • Hostsystem: Kubuntu 16.04.2

Expected behavior

Ansi escape sequences should be considered from within pipeline stage statements as e.g. described in https://jenkins.io/doc/pipeline/examples. Want to see colored stage labels in both jenkins console output and also in pipeline stage view.

Actual behavior

Ansi colors were actually not rendered in pipeline stage statements.

Steps to reproduce the behavior

Trying out the example from https://jenkins.io/doc/pipeline/examples shows not an expected result.
I'd modified the example a bit to this Jenkinsfile:

node {
    wrap([$class: 'AnsiColorBuildWrapper']) {
        stage("\u001B[31mI'm Red\u001B[m Now not") {
            echo "Hello \u001B[31mRed\u001B[m"
        }
        stage("\u001B[32mI'm Green\u001B[0m Now not") {
            echo "Hello \u001B[32mGreen\u001B[m"
        }
    }
}

Console output:
ansicolor-stage-console

StageView:
ansicolor-stage-view

@ssbarnea
Copy link

ssbarnea commented Mar 23, 2017

I love coloring but I think that we should NOT go this route, starting to put ASCII escapes inside stage names? Why not putting HTML code instead? It does not make much sense to me.

Instead I would focus on finding a way to distinguish these steps in the output console without needing to hack their names.

PS. I think you have more chances to succeed by injecting Unicode Emoji into those! ;)

@JoeMerten
Copy link
Collaborator Author

I'd just got the idea, because I'd found the example on https://jenkins.io/doc/pipeline/examples/ at the very top of the page. And it's definitive disadvantageous, that example won't give useful results.

No problem to reject this feature request, having now documented here that this is not supported.
But someone should also change the above mentioned example.

@RakeshNagarajan
Copy link

This functionality will be so cool. Expecting it in next update

@Dmitry1987
Copy link

The option to paint the stage item itself (background color) as a result of it's execution (like a method of "if failed servers more than 10%, paint in red" / "if failed tests more than 1, paint in yellow, if failed more than 10, paint in red") could be really useful, because for example we spawn 30-40 sub-pipelines from a parent job, and the huge "table" of all these pipelines is all green even if we detected some failures/issues here and there during some of them. So we need to either hover and read the logs to make sure there was no issues, or compose a report of all executions and read it instead.

@stale
Copy link

stale bot commented May 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 28, 2021
@stale stale bot closed this as completed Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request ✨ New feature to be added wontfix
Projects
None yet
Development

No branches or pull requests

4 participants