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

Allow to return matched text

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hello,

      At the moment (Text Finder v1.15) there is no way to store the matched text from Text Finder as a variable.

      e.g.

      stage('Foo') {
          steps {
              script {
                  def fooVar = findText(textFinders: [textFinder(alsoCheckConsoleOutput: true, regexp: 'xyz', returnstdout: true)])
                  echo fooVar
              }
          }
      }

      I have a use case where I need to do some actions based on the matched text.

      That also implies that to add another option to not change the "build result" because the user could take some other actions than changing build result.

      Best regards

        Attachments

          Activity

          Hide
          basil Basil Crow added a comment -

          Hey Ahmed AbouZaid, I would love to see this feature implemented. Pull requests are welcome!

          Show
          basil Basil Crow added a comment - Hey Ahmed AbouZaid , I would love to see this feature implemented. Pull requests are welcome!

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            aabouzaid Ahmed AbouZaid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: