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

Plugin unconditionally copies managed script to VC root / working dir even if it's read-only, which fails

XMLWordPrintable

      Using a ClearCase dynamic view, the root path itself is read-only (which contains N number of VOBs or repos, managed by the server), which prevents me from using this really valuable plugin.

      The error text from a job console looks like so:

      15:25:59  Running Prebuild steps
      15:25:59  executing script 'ScriptBuildStepConfigProvider.1325285620945'
      15:25:59  FATAL: Cannot create temporary script 'Setup ClearCase environment'
      15:25:59  hudson.util.IOException2: Failed to copy C:\Users\garepa.SEL\AppData\Local\Temp\build_step_template5292341656269454572.sh to M:\garepa_ux_view2/build_step_template5292341656269454572.sh
      15:25:59  	at hudson.FilePath.copyTo(FilePath.java:1415)
      15:25:59  	at org.jenkinsci.plugins.managedscripts.ScriptBuildStep.perform(ScriptBuildStep.java:167)
      15:25:59  	at org.jenkinsci.plugins.preSCMbuildstep.PreSCMBuildStepsWrapper.preCheckout(PreSCMBuildStepsWrapper.java:116)
      15:25:59  	at hudson.model.AbstractBuild$AbstractRunner.preCheckout(AbstractBuild.java:559)
      15:25:59  	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:459)
      15:25:59  	at hudson.model.Run.run(Run.java:1404)
      15:25:59  	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      15:25:59  	at hudson.model.ResourceController.execute(ResourceController.java:88)
      15:25:59  	at hudson.model.Executor.run(Executor.java:238)
      15:25:59  Caused by: java.io.FileNotFoundException: M:\garepa_ux_view2\build_step_template5292341656269454572.sh (The media is write protected)
      15:25:59  	at java.io.FileOutputStream.open(Native Method)
      15:25:59  	at java.io.FileOutputStream.<init>(Unknown Source)
      15:25:59  	at java.io.FileOutputStream.<init>(Unknown Source)
      15:25:59  	at hudson.FilePath$25.call(FilePath.java:1323)
      15:25:59  	at hudson.FilePath$25.call(FilePath.java:1319)
      15:25:59  	at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
      15:25:59  	at hudson.FilePath.write(FilePath.java:1319)
      15:25:59  	at hudson.FilePath.copyTo(FilePath.java:1408)
      15:25:59  	... 8 more
      15:25:59  Failed build for org.jenkinsci.plugins.managedscripts.ScriptBuildStep@1ebae65
      

      The copying would have succeeded if instead the destination to copy to was taken from the path in the WORKSPACE environment variable (which I'd think would be the original intent?)

            domi Dominik Bartholdi
            garen Garen Parham
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: