Groovy script lucks permissions on slave

XMLWordPrintable

    • Type: Bug
    • Resolution: Not A Defect
    • Priority: Major
    • Component/s: groovy-plugin
    • None
    • Environment:
      Jenkins-v1.576 on Windows
      Groovy plugin-v1.19
      Windows Slaves Plugin-v1.0

      I have a windows slave. On that slave I have a build, which got "Execute system Groovy script" as a buildstep. I am running a simple script there:
      def myFile = new File("C:/abc/abc.cmd")
      def fileText = myFile.text
      fileText = (fileText =~ /aa/).replaceFirst("bb")
      myFile.write(fileText)
      and I receive:
      FATAL: C:/abc/abc.cmd (The system cannot find the path specified)

      However, I am able to execute this script from node script console it runs just fine, so I suppose for some reason script is lucking permissions, when is executed as a build step.

            Assignee:
            vjuranek
            Reporter:
            Dmitrijs Sahlovs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: