• Blue Ocean 1.2-beta3, Blue Ocean 1.2-beta4, Blue Ocean 1.2

      Improvement on roadmap

      This improvement is on the Blue Ocean project roadmap. Check the roadmap page for updates.

      Has been requested that support for ANSI colours is desired

      Notes

          [JENKINS-41200] Developer can see ANSI color in log file

          Sorin Sbarnea added a comment -

          tashoyan, this is  really warring to me as it creates a clear deadlock for adopting BlueOcean UI. Now we have coloring working and not using BlueOcean.

          I want to promote it to others but if coloring is messed they will not get the buy-in.... and if I dare to remove the ansiColor {} one, I bet that nobody will allow me to even pass the core review on that change.

          Sorin Sbarnea added a comment - tashoyan , this is  really warring to me as it creates a clear deadlock for adopting BlueOcean UI. Now we have coloring working and not using BlueOcean. I want to promote it to others but if coloring is messed they will not get the buy-in.... and if I dare to remove the ansiColor {} one, I bet that nobody will allow me to even pass the core review on that change.

          Michael Neale added a comment -

          ssbarnea yes no one has found a way to make it work with both. Classic doesn't use standard ansi codes but a weird serialization mechanism which isn't really able to work with blue ocean, but if someone was to have another crack  at making it also work, that could be good (perhaps open another ticket though). 

          Michael Neale added a comment - ssbarnea yes no one has found a way to make it work with both. Classic doesn't use standard ansi codes but a weird serialization mechanism which isn't really able to work with blue ocean, but if someone was to have another crack  at making it also work, that could be good (perhaps open another ticket though). 

          Josh McDonald added a comment -

          I have a fix for this that will require patches to the ansicolor plugin. Problem is it breaks like 150 unit tests so if it's a priority I can spend the time fixing them, but there's no guarantee the maintainers will be interested in accepting it as it might work in a way they don't like (it's kinda kludgey but still nice than trying to parse the HTML)

          Josh McDonald added a comment - I have a fix for this that will require patches to the ansicolor plugin. Problem is it breaks like 150 unit tests so if it's a priority I can spend the time fixing them, but there's no guarantee the maintainers will be interested in accepting it as it might work in a way they don't like (it's kinda kludgey but still nice than trying to parse the HTML)

          Sorin Sbarnea added a comment -

          sophistifunk, I will help with it, I made few patches to ANSI color myself in the past and if we can make it pass unittests, it will be merged and releases, quicker than you think. CC me on it (ssbarnea on github).

          Sorin Sbarnea added a comment - sophistifunk , I will help with it, I made few patches to ANSI color myself in the past and if we can make it pass unittests, it will be merged and releases, quicker than you think. CC me on it (ssbarnea on github).

          Andrew Gray added a comment -

          I am using 1.4.1 and it doesn't look like `
          ansiColor('xterm') { ... }
          works at all in blue ocean. 

          Where am I supposed to see this colored console?

          Andrew Gray added a comment - I am using 1.4.1 and it doesn't look like ` ansiColor('xterm') { ... } works at all in blue ocean.  Where am I supposed to see this colored console?

          Michael Neale added a comment -

          apgray remove the ansiColor, and colour codes should automatically show up I believe right sophistifunk

           

          ansiColor injects binary noise and wipes out the real ansi codes so can't work with blue ocean or any log viewed other than the jenkins log, due to a very bad design mistake early on. 

          Michael Neale added a comment - apgray  remove the ansiColor, and colour codes should automatically show up I believe right sophistifunk ?    ansiColor injects binary noise and wipes out the real ansi codes so can't work with blue ocean or any log viewed other than the jenkins log, due to a very bad design mistake early on. 

          Josh McDonald added a comment -

          Yes, currently you need to run your pipeline without ansiColor in order to see the colours in BO.

          Josh McDonald added a comment - Yes, currently you need to run your pipeline without ansiColor in order to see the colours in BO.

          Jesse Glick added a comment -

          Jesse Glick added a comment - https://github.com/jenkinsci/ansicolor-plugin/pull/132#issuecomment-440937753

          Josh McDonald added a comment - - edited

          Happy to see this! It's way more thorough than my experimental patch I never had the time to fix tests for  All I did was stop stripping the codes, and bookend them with injected

          <!--

          and

          -->

          "tags" in the annotation stream. 

          Josh McDonald added a comment - - edited Happy to see this! It's way more thorough than my experimental patch I never had the time to fix tests for   All I did was stop stripping the codes, and bookend them with injected <!-- and --> "tags" in the annotation stream. 

          Jesse Glick added a comment -

          Ooh, the use of comments rather than <span style="display: none">…</span> is a nice trick. Ported it

          Jesse Glick added a comment - Ooh, the use of comments rather than <span style="display: none">…</span> is a nice trick. Ported it

            sophistifunk Josh McDonald
            michaelneale Michael Neale
            Votes:
            29 Vote for this issue
            Watchers:
            43 Start watching this issue

              Created:
              Updated:
              Resolved: