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

Plugin does not work on Master / Slave Setup

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: last-changes-plugin
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.656
      last-changes 1.0.1
    • Similar Issues:

      Description

      This plugin does not work with Master / Slave Setup.... Only works with builds on master. If I run this with Master / Slave, I get the following error:ERROR: Build step failed with exception
      java.lang.RuntimeException: No git or svn repository found at /var/lib/jenkins/workspace/Test/TestLastChangesPlugin
      at com.github.jenkins.lastchanges.LastChangesPublisher.perform(LastChangesPublisher.java:109)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      at hudson.model.Build$BuildExecution.post2(Build.java:185)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      at hudson.model.Run.execute(Run.java:1763)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Build step 'Publish Last Changes' marked build as failure

      It's clearly trying to look for that workspace on master and not the slave.

        Attachments

          Activity

          Hide
          rmpestano Rafael Pestano added a comment - - edited

          Hi Ebrahim Moshaya, can you confirm that It is working for freestyle projects in master/slave setup?

          I will investigate maven projects.

          Show
          rmpestano Rafael Pestano added a comment - - edited Hi Ebrahim Moshaya , can you confirm that It is working for freestyle projects in master/slave setup? I will investigate maven projects.
          Hide
          rmpestano Rafael Pestano added a comment - - edited

          For me it still works with maven builds in master slave but I'm on a windows box here.

          I suspect it is a permission issues cause the if statement at [1] passes for you but looks like it is failling to copy to master workspace on [2] (probably because of the new File() ;( ).

          The only strange thing to me is that it works for freestyle projecs.

          [1] https://github.com/jenkinsci/last-changes-plugin/blob/5eaf771e9ffb0d613ab1ed9723a973f2e319c874/src/main/java/com/github/jenkins/lastchanges/LastChangesPublisher.java#L103
          [2] https://github.com/jenkinsci/last-changes-plugin/blob/5eaf771e9ffb0d613ab1ed9723a973f2e319c874/src/main/java/com/github/jenkins/lastchanges/LastChangesPublisher.java#L116

          Show
          rmpestano Rafael Pestano added a comment - - edited For me it still works with maven builds in master slave but I'm on a windows box here. I suspect it is a permission issues cause the if statement at [1] passes for you but looks like it is failling to copy to master workspace on [2] (probably because of the new File() ;( ). The only strange thing to me is that it works for freestyle projecs. [1] https://github.com/jenkinsci/last-changes-plugin/blob/5eaf771e9ffb0d613ab1ed9723a973f2e319c874/src/main/java/com/github/jenkins/lastchanges/LastChangesPublisher.java#L103 [2] https://github.com/jenkinsci/last-changes-plugin/blob/5eaf771e9ffb0d613ab1ed9723a973f2e319c874/src/main/java/com/github/jenkins/lastchanges/LastChangesPublisher.java#L116
          Hide
          rmpestano Rafael Pestano added a comment -

          Hi again,

          I've managed to eliminate the suspect new File on slave remote dir.

          Can you try with latest snapshot: http://maven.jenkins-ci.org:8081/content/repositories/snapshots/org/jenkins-ci/plugins/last-changes/1.0.3-SNAPSHOT/last-changes-1.0.3-20160726.143225-1.hpi

          Show
          rmpestano Rafael Pestano added a comment - Hi again, I've managed to eliminate the suspect new File on slave remote dir. Can you try with latest snapshot: http://maven.jenkins-ci.org:8081/content/repositories/snapshots/org/jenkins-ci/plugins/last-changes/1.0.3-SNAPSHOT/last-changes-1.0.3-20160726.143225-1.hpi
          Hide
          emoshaya_cognitoiq Ebrahim Moshaya added a comment -

          Hi Rafael Pestano, your latest snapshot works with Maven projects now only if we checkout or do a git clone from the root of the Workspace. However, if we use git's additional behaviors "Check out to a sub-directory" as we have setup in our maven builds.

          Then the plugin cannot locate the git repo because the clone is in a directory in the WORKSPACE.... Can't your plugin do a recursive check of the .git directory from $WORKSPACE?

          java.lang.RuntimeException: No git or svn repository found at /var/lib/jenkins/workspace/Test/TestLastChangesPlugin-Maven
          at com.github.jenkins.lastchanges.LastChangesPublisher.perform(LastChangesPublisher.java:103)
          at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
          at hudson.model.Run.execute(Run.java:1763)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:410)

          Show
          emoshaya_cognitoiq Ebrahim Moshaya added a comment - Hi Rafael Pestano , your latest snapshot works with Maven projects now only if we checkout or do a git clone from the root of the Workspace. However, if we use git's additional behaviors "Check out to a sub-directory" as we have setup in our maven builds. Then the plugin cannot locate the git repo because the clone is in a directory in the WORKSPACE.... Can't your plugin do a recursive check of the .git directory from $WORKSPACE? java.lang.RuntimeException: No git or svn repository found at /var/lib/jenkins/workspace/Test/TestLastChangesPlugin-Maven at com.github.jenkins.lastchanges.LastChangesPublisher.perform(LastChangesPublisher.java:103) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410)
          Hide
          rmpestano Rafael Pestano added a comment -

          Hi Ebrahim Moshaya, I think it is possible to support sub directories, I've created an issue for this: https://issues.jenkins-ci.org/browse/JENKINS-36971.

          Thanks for your feedback.

          Show
          rmpestano Rafael Pestano added a comment - Hi Ebrahim Moshaya , I think it is possible to support sub directories, I've created an issue for this: https://issues.jenkins-ci.org/browse/JENKINS-36971 . Thanks for your feedback.

            People

            • Assignee:
              rmpestano Rafael Pestano
              Reporter:
              emoshaya_cognitoiq Ebrahim Moshaya
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: