Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54133

No ANSI coloring on slave agents in pipeline

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      Pipeline:

      node('master'){
          ansiColor('xterm') {
              sh 'echo -e "\033[31mRed\033[0m"'
          }
          wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
              sh 'echo -e "\033[31mRed\033[0m"'
          }
      }
      node('ansible'){
          ansiColor('xterm') {
              sh 'echo -e "\033[31mRed\033[0m"'
          }
          wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
              sh 'echo -e "\033[31mRed\033[0m"'
          }
      }
      

      Output:

       

       

       

      I've verified I see ANSI coloring on a freestyle project restricted to the same 'ansible' label

      Shell build step

       

      echo -e "\033[31mRed\033[0m"
      

      Output

       

       

      I've verified this happens on multiple Jenkins instances running 2.138.2. This started happening after the following plugin updates:

      -rw-r--r--. 1 jenkins jenkins  560808 Oct 12 16:54 workflow-cps.jpi
      -rw-r--r--. 1 jenkins jenkins  111622 Oct 12 16:54 workflow-job.jpi
      -rw-r--r--. 1 jenkins jenkins  311324 Oct 12 16:54 ws-cleanup.jpi
      -rw-r--r--. 1 jenkins jenkins  360909 Oct 12 16:54 workflow-support.jpi
      

       

       

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            I seem to have succeeded in using ConsoleAnnotatorFactory after all.

            Show
            jglick Jesse Glick added a comment - I seem to have succeeded in using ConsoleAnnotatorFactory after all.
            Hide
            jglick Jesse Glick added a comment -

            All associated PRs merged.

            Show
            jglick Jesse Glick added a comment - All associated PRs merged.
            Hide
            cleclerc Cyrille Le Clerc added a comment -

            Delivered in pipeline-maven-plugin 3.6.0

            Show
            cleclerc Cyrille Le Clerc added a comment - Delivered in pipeline-maven-plugin 3.6.0
            Hide
            jglick Jesse Glick added a comment -

            Thus the fixes for ant and pipeline-maven have been released; as well as the hotfix of this issue as originally filed for ansicolor (PRs 128 & 130), though the full fix through rewrite (PR 132) which is merged but not yet released by Devin Nusbaum (and which also requires a post-LTS version of Jenkins core).

            Show
            jglick Jesse Glick added a comment - Thus the fixes for ant and pipeline-maven have been released; as well as the hotfix of this issue as originally filed for ansicolor (PRs 128 & 130), though the full fix through rewrite (PR 132) which is merged but not yet released by Devin Nusbaum (and which also requires a post-LTS version of Jenkins core).
            Hide
            dnusbaum Devin Nusbaum added a comment -

            Jesse Glick I just released the full fix for ansicolor in version 0.6.0 of the plugin.

            Show
            dnusbaum Devin Nusbaum added a comment - Jesse Glick I just released the full fix for ansicolor in version 0.6.0 of the plugin.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                bspecht Ben Specht
              • Votes:
                3 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: