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

Allow to return matched text

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • text-finder-plugin
    • None

      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

            Unassigned Unassigned
            aabouzaid Ahmed AbouZaid
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: