Jenkins with custom build record root dir: renaming a job should create the new build record dir if it does not already exist

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

XMLWordPrintable

      We are using the (great) custom build record root directory feature, to store build records on an external location, at /some-static-path/${ITEM_FULLNAME}/builds

      So far so good.

      But when we rename a helloWorld job (which has build records) to helloWorld.newname, the rename succeeds, but throws this exception in the browser:

      Exception: failed to rename /some-static-path/helloWorld/builds to /some-static-path/helloWorld.newname/builds
      Stacktrace:
      java.io.IOException: failed to rename /some-static-path/helloWorld/builds to /some-static-path/helloWorld.newname/builds
      at hudson.model.Job.renameTo(Job.java:579)
      at hudson.model.Job.doDoRename(Job.java:1294)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
      at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:29)
      at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:389)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)

      It seems the main issue here is that the 'new' external location directory at /some-static-path/helloWorld.newname/builds does not yet exist. Is it possible to do a 'mkdir -p' to create this directory, before doing the renameTo?

            Assignee:
            Daniel Beck
            Reporter:
            Steve Roth
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: