This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      Requirement:

      • place the choice contents(a1,a2,a3,a4) in a file at unix, with help of Groovy script get the contents and return the list

      What works:
      ------------
      def list1 = ["a1", "a2", "a3" ]
      return list1
      -----------------

      What doesn't work:
      — keeping the choice contents in a unix file and pulling the list using groovy script and return the values.
      vi groovey1
      "t1",
      "t2",
      "t3",
      ---------
      Groovy script:
      ----------------
      def File file = new File("/infapoc2/jenkins/Scripts/reports/script_report/groovey1")
      def fileContent = file.getText()
      return [fileContent]
      ------------
      Output: o "t1", "t2", "t3"

      but expected "
      o t1
      o t2
      o t3

            Assignee:
            Bruno P. Kinoshita
            Reporter:
            nikhil potti
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: