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

No ANSI coloring on slave agents in pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor

      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
      

       

       

            jglick Jesse Glick
            bspecht Ben Specht
            Votes:
            3 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: