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

Not able to get control on output while running command

XMLWordPrintable

      I have written jenkins projects as pipeline code in groovy and to parse output of commands as well as showing it to jenkins console i am using 'tee' so that i can get output in a file, as shown below:
      cmd = cmd+" 2>&1 | tee log.txt"

      Now the problem is, this way parsing starts only when command gets completed and which becomes irritating for long running processes and also parsing takes time for such lengthy logs.

      I searched a lot for something where i can get outputs line by line while running any command using bat/sh dsl and fail the project depending on string found in that line.

      I run these dsl on slaves and jenkins master schedules these commands.

            jglick Jesse Glick
            praverma Prateek VERMA
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: