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

Seems to not handle having builds in seperate folder

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • Ubuntu 11.10
      Jenkins 1.461
      SCM Sync Configuration Plugin 0.0.5

      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.IllegalArgumentException: Err ! File [/mnt/store/jenkins/CodeGenerationMaven/builds/2012-04-25_15-39-35/build.xml] seems not to reside in [/var/lib/jenkins] !
      at hudson.plugins.scm_sync_configuration.JenkinsFilesHelper.buildPathRelativeToHudsonRoot(JenkinsFilesHelper.java:12)
      at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matches(PatternsEntityMatcher.java:21)
      at hudson.plugins.scm_sync_configuration.strategies.AbstractScmSyncStrategy.isSaveableApplicable(AbstractScmSyncStrategy.java:22)
      at hudson.plugins.scm_sync_configuration.ScmSyncConfigurationPlugin.getStrategyForSaveable(ScmSyncConfigurationPlugin.java:172)
      at hudson.plugins.scm_sync_configuration.extensions.ScmSyncConfigurationSaveableListener.onChange(ScmSyncConfigurationSaveableListener.java:19)
      at hudson.model.listeners.SaveableListener.fireOnChange(SaveableListener.java:78)
      at hudson.model.Run.save(Run.java:1571)
      at hudson.maven.MavenModuleSetBuild.setMavenVersionUsed(MavenModuleSetBuild.java:388)
      at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:581)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:475)
      at hudson.model.Run.run(Run.java:1434)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:477)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:239)

          [JENKINS-13593] Seems to not handle having builds in seperate folder

          Hi Christian,

          Can you confirm your JENKINS_HOME is /var/lib/jenkins (it should since this is what I get when I use Hudson.getInstance().getRootDir())

          Do you know which plugin (or script) is generating this file ?
          I need more context for your specific use, I could remove this exception check, but I could avoid it, I'd prefer

          Frédéric Camblor added a comment - Hi Christian, Can you confirm your JENKINS_HOME is /var/lib/jenkins (it should since this is what I get when I use Hudson.getInstance().getRootDir()) Do you know which plugin (or script) is generating this file ? I need more context for your specific use, I could remove this exception check, but I could avoid it, I'd prefer

          HOME /var/lib/jenkins
          JENKINS_HOME /var/lib/jenkins
          LANG en_US.UTF-8
          LANGUAGE en_US:en
          LD_LIBRARY_PATH /usr/lib/jvm/jdk1.6.0_31/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_31/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_31/jre/../lib/amd64
          LOGNAME jenkins
          MAIL /var/mail/jenkins
          NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat
          PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
          PWD /var/lib/jenkins
          SHELL /bin/bash
          SHLVL 1
          TERM screen
          USER jenkins
          XDG_SESSION_COOKIE 2a2862c8d59aff8cfea5a5f000000010-1335363605.122239-652733116
          XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt

          Christian Lövsund added a comment - HOME /var/lib/jenkins JENKINS_HOME /var/lib/jenkins LANG en_US.UTF-8 LANGUAGE en_US:en LD_LIBRARY_PATH /usr/lib/jvm/jdk1.6.0_31/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_31/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_31/jre/../lib/amd64 LOGNAME jenkins MAIL /var/mail/jenkins NLSPATH /usr/dt/lib/nls/msg/%L/%N.cat PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games PWD /var/lib/jenkins SHELL /bin/bash SHLVL 1 TERM screen USER jenkins XDG_SESSION_COOKIE 2a2862c8d59aff8cfea5a5f000000010-1335363605.122239-652733116 XFILESEARCHPATH /usr/dt/app-defaults/%L/Dt

          I got this Exception when trying to build any job in jenkins.
          So I needed to uninstall/disable plugin in order to make Jenkins build any job.
          It worked before I updated from version 0.0.4
          I have a setup where all the build data (artifacts and all) is put on a big slower disk, while jenkins itself and all build occur on a SSD.
          See picture for more info.

          Christian Lövsund added a comment - I got this Exception when trying to build any job in jenkins. So I needed to uninstall/disable plugin in order to make Jenkins build any job. It worked before I updated from version 0.0.4 I have a setup where all the build data (artifacts and all) is put on a big slower disk, while jenkins itself and all build occur on a SSD. See picture for more info.

          Wow ok this is related to this workspace root directory / build record root directory configuration stuff !

          I think you're the first person I encounter using these fields

          I'll try to see if I can find a workaround about this special case..

          Frédéric Camblor added a comment - Wow ok this is related to this workspace root directory / build record root directory configuration stuff ! I think you're the first person I encounter using these fields I'll try to see if I can find a workaround about this special case..

          great, thanks!

          Christian Lövsund added a comment - great, thanks!

          Hi! I've same issue with SCM Sync Configuration Plugin.
          I use Windows 2008 R2.
          Jenkins home and build data is placed on different drives.
          This issue has appeared when I upgrade Jenkins from 1.459 to 1.461

          Alexander Alexeev added a comment - Hi! I've same issue with SCM Sync Configuration Plugin. I use Windows 2008 R2. Jenkins home and build data is placed on different drives. This issue has appeared when I upgrade Jenkins from 1.459 to 1.461

          Joe Mihalich added a comment -

          At minimum the builds directory field is completely non functional. It updates the build-directory in the master config.xml but it does not even attempt to create the jobs in that directory. The jobs are always created in the jenkins home dir/jobs. It doesn't seem like this variable is meant to specify a jobs directory. The field description in the help doesn't match the field title. This field does not work for me in builds 459-461 (minimum). I don't know if they worked before those builds.

          Anyway, as a work around till you figure this out, I just left the defaults alone, and deleted the jobs & workspace directory, and created them again as symlinks to the drive i wanted them created on. This seems to work fine.

          The functionality we need for my purposes is a way to specify the directory where the workspaces go, and where the jobs go.

          Thanks,
          Joe

          Joe Mihalich added a comment - At minimum the builds directory field is completely non functional. It updates the build-directory in the master config.xml but it does not even attempt to create the jobs in that directory. The jobs are always created in the jenkins home dir/jobs. It doesn't seem like this variable is meant to specify a jobs directory. The field description in the help doesn't match the field title. This field does not work for me in builds 459-461 (minimum). I don't know if they worked before those builds. Anyway, as a work around till you figure this out, I just left the defaults alone, and deleted the jobs & workspace directory, and created them again as symlinks to the drive i wanted them created on. This seems to work fine. The functionality we need for my purposes is a way to specify the directory where the workspaces go, and where the jobs go. Thanks, Joe

          Seeing this issue with SCM Sync Configuration Plugin when the workspace is not in Jenkins home. It freezes the build flow with this error in the log.

          Is the best workaround to not use a custom workspace so the workspace is in Jenkins home?

          Any chance of getting this fixed?

          Matthew Boedicker added a comment - Seeing this issue with SCM Sync Configuration Plugin when the workspace is not in Jenkins home. It freezes the build flow with this error in the log. Is the best workaround to not use a custom workspace so the workspace is in Jenkins home? Any chance of getting this fixed?

          Yup I don't see any other workaround ATM

          This issue is not on my top level priority list, so PR are welcome

          Frédéric Camblor added a comment - Yup I don't see any other workaround ATM This issue is not on my top level priority list, so PR are welcome

          I am seeing the same issue in combination with other plugins such as the claim and disk usage plugins. We are using a separate workspace, build and JENKINS_HOME directory.

          Marios Nikolaou added a comment - I am seeing the same issue in combination with other plugins such as the claim and disk usage plugins. We are using a separate workspace, build and JENKINS_HOME directory.

          This also affects Jenkins 1.520 with SCM Sync Config 0.0.7.3.

          Matthew Firtion added a comment - This also affects Jenkins 1.520 with SCM Sync Config 0.0.7.3.

          I got the same issue, but using Jenkins 1.568 with Windows (SCM Sync Config 0.0.7.4). I cannot use the default install workspace path (C:\Program Files\Jenkins\..) as my git repo has many, many, many long nested folders and I hit the 260 characters windows file path limitation...

          Dominic St-Jacques added a comment - I got the same issue, but using Jenkins 1.568 with Windows (SCM Sync Config 0.0.7.4). I cannot use the default install workspace path (C:\Program Files\Jenkins\..) as my git repo has many, many, many long nested folders and I hit the 260 characters windows file path limitation...

          Fixed in 0.0.9

          Craig Rodrigues added a comment - Fixed in 0.0.9

            fcamblor Frédéric Camblor
            chrislovsund Christian Lövsund
            Votes:
            9 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: