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

Groovy Postbuild Plugin does not like Jenkins Option: "Build Record Root Directory"

      I have had lots of great success with this plugin . . . thank you so much.

      I have a Jenkins instance where the option "Build Record Root Directory" has been set (Jenkins->Config->Advanced right under Jenkins Root).

      So JENKINS_HOME is under C:\Program Files, but the build records are under C:\jenkins . . . see error messages below.

      In this case, the plugin is throwing the following error for all jobs:

      ERROR: Publisher org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder aborted due to exception
      java.lang.IllegalArgumentException: Err ! File [C:\jenkins\fmerrow3\Update Robo CSPECs\builds\2013-10-10_14-06-37\build.xml] seems not to reside in [C:\Program Files (x86)\Jenkins] !
      at hudson.plugins.scm_sync_configuration.JenkinsFilesHelper.buildPathRelativeToHudsonRoot(JenkinsFilesHelper.java:12)
      at hudson.plugins.scm_sync_configuration.strategies.model.PatternsEntityMatcher.matches(PatternsEntityMatcher.java:25)

          [JENKINS-19984] Groovy Postbuild Plugin does not like Jenkins Option: "Build Record Root Directory"

          Frank Merrow added a comment -

          Now having the same issue under Linux . . . as before Build Record Root Directory has been changed by the user:

          ERROR: Publisher org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder aborted due to exception
          java.lang.IllegalArgumentException: Err ! File [/local/jenkins/MPSS.DI.3.0.r1-auto/builds/2014-02-13_01-30-21/build.xml] seems not to reside in [/var/lib/jenkins] !

          User's Build Record Root Directory setting is: /local/jenkins/${ITEM_FULL_NAME}/builds

          Frank Merrow added a comment - Now having the same issue under Linux . . . as before Build Record Root Directory has been changed by the user: ERROR: Publisher org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder aborted due to exception java.lang.IllegalArgumentException: Err ! File [/local/jenkins/MPSS.DI.3.0.r1-auto/builds/2014-02-13_01-30-21/build.xml] seems not to reside in [/var/lib/jenkins] ! User's Build Record Root Directory setting is: /local/jenkins/${ITEM_FULL_NAME}/builds

          ikedam added a comment -

          The log indicates the problem happens in scm-sync-configuration plugin.

          ikedam added a comment - The log indicates the problem happens in scm-sync-configuration plugin.

          Seems a dupe of JENKINS-13593 isn't it ?

          Frédéric Camblor added a comment - Seems a dupe of JENKINS-13593 isn't it ?

          Frank Merrow added a comment -

          Yes, seems to be . . . in fact today ran into this situation:

          Production System . . . been working for a long time. We did an upgrade and decided we wanted to save configuration files in our get hub and so installed SCM Config plugin . . . we had not yet even configured that (that was planned for later after the release) . . . so as far as I know it was just sitting there idle.

          Job that had been running forever with no changes started getting the error . . . I "fixed it" by disabling the SCM Config plugin.

          FWIW: I would REALLY like to be able to run both plugins together.

          Frank

          Frank Merrow added a comment - Yes, seems to be . . . in fact today ran into this situation: Production System . . . been working for a long time. We did an upgrade and decided we wanted to save configuration files in our get hub and so installed SCM Config plugin . . . we had not yet even configured that (that was planned for later after the release) . . . so as far as I know it was just sitting there idle. Job that had been running forever with no changes started getting the error . . . I "fixed it" by disabling the SCM Config plugin. FWIW: I would REALLY like to be able to run both plugins together. Frank

          Code changed in jenkins
          User: Tom
          Path:
          src/main/java/hudson/plugins/scm_sync_configuration/JenkinsFilesHelper.java
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/JobOrFolderConfigurationEntityMatcher.java
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java
          src/test/java/hudson/plugins/scm_sync_configuration/basic/ScmSyncConfigurationBasicTest.java
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/dec742843b95e8423ffc7f7182c43574483fac6f
          Log:
          JENKINS-18401: Don't fail on files outside $JENKINS_HOME

          This plugin can only put things under $JENKINS_HOME into SCM. If
          workspaces are located elsewhere, it failed with an exception.

          Newly, we just ignore such files. In all likelihood, users won't want
          to sync workspace files anyway. The same goes for the builds directory.
          People who really might want to put stuff from there into SCM can
          try symlinking to their desired workspace/build roots from
          $JENKINS_HOME. Restoring from SCM may, however, then produce unexpected
          results.

          Should fix JENKINS-18401 and related issues such as JENKINS-13593 and
          JENKINS-19984.

          Includes two tests for buildPathRelativeToHudsonRoot(), and use
          org.junit.Assert.assertNotNull etc.instead of the hamcrest matchers.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Path: src/main/java/hudson/plugins/scm_sync_configuration/JenkinsFilesHelper.java src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/JobOrFolderConfigurationEntityMatcher.java src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java src/test/java/hudson/plugins/scm_sync_configuration/basic/ScmSyncConfigurationBasicTest.java http://jenkins-ci.org/commit/scm-sync-configuration-plugin/dec742843b95e8423ffc7f7182c43574483fac6f Log: JENKINS-18401 : Don't fail on files outside $JENKINS_HOME This plugin can only put things under $JENKINS_HOME into SCM. If workspaces are located elsewhere, it failed with an exception. Newly, we just ignore such files. In all likelihood, users won't want to sync workspace files anyway. The same goes for the builds directory. People who really might want to put stuff from there into SCM can try symlinking to their desired workspace/build roots from $JENKINS_HOME. Restoring from SCM may, however, then produce unexpected results. Should fix JENKINS-18401 and related issues such as JENKINS-13593 and JENKINS-19984 . Includes two tests for buildPathRelativeToHudsonRoot(), and use org.junit.Assert.assertNotNull etc.instead of the hamcrest matchers.

          Code changed in jenkins
          User: Tom
          Path:
          src/main/java/hudson/plugins/scm_sync_configuration/JenkinsFilesHelper.java
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/JobOrFolderConfigurationEntityMatcher.java
          src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java
          src/test/java/hudson/plugins/scm_sync_configuration/basic/ScmSyncConfigurationBasicTest.java
          http://jenkins-ci.org/commit/scm-sync-configuration-plugin/71ab123614b2b9dd04b157ff6911d5963a3c0924
          Log:
          JENKINS-18401 Don't fail on files outside $JENKINS_HOME

          This plugin can only put things under $JENKINS_HOME into SCM. If
          workspaces are located elsewhere, it failed with an exception.

          Newly, we just ignore such files. In all likelihood, users won't want
          to sync workspace files anyway. The same goes for the builds directory.
          People who really might want to put stuff from there into SCM can
          try symlinking to their desired workspace/build roots from
          $JENKINS_HOME. Restoring from SCM may, however, then produce unexpected
          results.

          Should fix JENKINS-18401 and related issues such as JENKINS-13593 and
          JENKINS-19984.

          Includes two tests for buildPathRelativeToHudsonRoot(), and use
          org.junit.Assert.assertNotNull etc.instead of the hamcrest matchers.

          JENKINS-13593 JENKINS-19984

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Path: src/main/java/hudson/plugins/scm_sync_configuration/JenkinsFilesHelper.java src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/JobOrFolderConfigurationEntityMatcher.java src/main/java/hudson/plugins/scm_sync_configuration/strategies/model/PatternsEntityMatcher.java src/test/java/hudson/plugins/scm_sync_configuration/basic/ScmSyncConfigurationBasicTest.java http://jenkins-ci.org/commit/scm-sync-configuration-plugin/71ab123614b2b9dd04b157ff6911d5963a3c0924 Log: JENKINS-18401 Don't fail on files outside $JENKINS_HOME This plugin can only put things under $JENKINS_HOME into SCM. If workspaces are located elsewhere, it failed with an exception. Newly, we just ignore such files. In all likelihood, users won't want to sync workspace files anyway. The same goes for the builds directory. People who really might want to put stuff from there into SCM can try symlinking to their desired workspace/build roots from $JENKINS_HOME. Restoring from SCM may, however, then produce unexpected results. Should fix JENKINS-18401 and related issues such as JENKINS-13593 and JENKINS-19984 . Includes two tests for buildPathRelativeToHudsonRoot(), and use org.junit.Assert.assertNotNull etc.instead of the hamcrest matchers. JENKINS-13593 JENKINS-19984

          Fixed in 0.0.9

          Craig Rodrigues added a comment - Fixed in 0.0.9

            fcamblor Frédéric Camblor
            fmerrow Frank Merrow
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: