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

string value in Groovy script in Reactive Choice parameter replaced with null when approved in in-process script approval

    Details

    • Similar Issues:

      Description

      My reactive choice parameter groovy script is following 
      def command = ["/bin/bash", "-c", "git ls-remote --tags " + repourl]
      def process = command.execute()
      process.waitFor()
      def t1 = []
      def result = process.in.text.tokenize('
      n')

      for(i in result)
      {
      def tagName = i.split()[1].replaceAll('\\^{
      }','').replaceAll('refs/tags/', '')

      t1.add(tagName)
      }

      return t1

       

      But when I check this script in in-process script approval it looks like this 

      def command = ["/bin/bash", "-c", "git ls-remote --tags " + repourl]
      def process = command.execute()
      process.waitFor()
      def t1 = []
      def result = process.in.text.tokenize("
      ")
      for(i in result)
      {
      def tagName = i.split()[1].replaceAll('^{}','').replaceAll('refs/tags/', '')
      t1.add(tagName)
      }

      And when I approved it this script contains error 
      I am blocked here 

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              kinow Bruno P. Kinoshita
              Reporter:
              saman nimesh saman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: