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

GitBlamer does not work if git workspace is in subfolder

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Windows Server 2012, CloudBees Jenkins Enterprise 2.46.24.0.2-fixed
    • 5.0.0-beta3

      We use a different .git Sub-Folder inner the Workspace for Git Repository.

      Workspace Folder:
      E:\SCM/WKS/safir_WAS/Template-Basis-20151013

      Git Folder:
      E:\SCM/WKS/safir_WAS/Template-Basis-20151013/GIT

      The Build failed with:

      17.07.2017 10:41:47 [WARNINGS] Parsing warnings in console log with parser Java Compiler (javac)
      17.07.2017 10:41:47 <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
      17.07.2017 10:41:47 <Git Blamer> Getting blame results for all files in E:\SCM/WKS/safir_WAS/Template-Basis-20151013.
      17.07.2017 10:41:47  > git.exe rev-parse "0f01e15e5cce133c426e9f9a2603b2b2c2adedb0^{commit}" # timeout=10
      17.07.2017 10:41:47 ERROR: Build step failed with exception
      17.07.2017 10:41:47 hudson.plugins.git.GitException: Command "git.exe rev-parse "0f01e15e5cce133c426e9f9a2603b2b2c2adedb0^{commit}"" returned status code 128:
      17.07.2017 10:41:47 stdout:
      17.07.2017 10:41:47 stderr: fatal: Not a git repository (or any of the parent directories): .git

          [JENKINS-45572] GitBlamer does not work if git workspace is in subfolder

          I get the same fatal error on macOS Sierra 10.12.5.

          Francis Labrie added a comment - I get the same fatal error on macOS Sierra  10.12.5.

          Ulli Hafner added a comment -

          You can deactivate this new feature in Jenkins Global configuration (Static Analysis Utilities -> Omit author and commit information) until this is fixed.

          Is there an exception stacktrace? I thought that I have a catch around each git call...

          Ulli Hafner added a comment - You can deactivate this new feature in Jenkins Global configuration (Static Analysis Utilities -> Omit author and commit information) until this is fixed. Is there an exception stacktrace? I thought that I have a catch around each git call...

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          analysis-core
          http://jenkins-ci.org/commit/analysis-suite-plugin/eb9e5c4d6f7d96e2c58567a7d7a3f9045ba95776
          Log:
          JENKINS-45572 Don't fail build if git rev-parse throws exception.

          Compare: https://github.com/jenkinsci/analysis-suite-plugin/compare/eb0cdcfbc64b...eb9e5c4d6f7d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-core http://jenkins-ci.org/commit/analysis-suite-plugin/eb9e5c4d6f7d96e2c58567a7d7a3f9045ba95776 Log: JENKINS-45572 Don't fail build if git rev-parse throws exception. Compare: https://github.com/jenkinsci/analysis-suite-plugin/compare/eb0cdcfbc64b...eb9e5c4d6f7d

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/hudson/plugins/analysis/util/GitBlamer.java
          http://jenkins-ci.org/commit/analysis-core-plugin/26af1875e544697d5aa6baa203f4ecf00aa6c554
          Log:
          JENKINS-45572 Don't fail build if git rev-parse throws exception.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/util/GitBlamer.java http://jenkins-ci.org/commit/analysis-core-plugin/26af1875e544697d5aa6baa203f4ecf00aa6c554 Log: JENKINS-45572 Don't fail build if git rev-parse throws exception.

          Ulli Hafner added a comment - - edited

          (Ok, I fixed the uncaught exception, released in 1.89 of analysis-core.)

          Where or how did you specify the name of this sub folder?

          Ulli Hafner added a comment - - edited (Ok, I fixed the uncaught exception, released in 1.89 of analysis-core.) Where or how did you specify the name of this sub folder?

          I specify the name of the sub folder in the job config:

          Source-Code-Management….Additional Behaviors… Check out to a sub-directory

          Christian Häussler added a comment - I specify the name of the sub folder in the job config: Source-Code-Management….Additional Behaviors… Check out to a sub-directory

          The issue is not resolved.

          Job-Log:

          23.02.2018 10:54:36 <Git Blamer> Using GitBlamer to create author and commit information for all warnings.
          23.02.2018 10:54:36 <Git Blamer> Getting blame results for all files in E:\SCM/WKS/hus/HUS GEVO Glas.
          23.02.2018 10:54:36 > E:\Software\Git-2.9.2\cmd\git.exe rev-parse "1ff17b3847091fe15639bda58069530615ecdad1^{commit}" # timeout=10
          23.02.2018 10:54:36 ERROR: Build step failed with exception
          23.02.2018 10:54:36 hudson.plugins.git.GitException: Command "E:\Software\Git-2.9.2\cmd\git.exe rev-parse "1ff17b3847091fe15639bda58069530615ecdad1^{commit}"" returned status code 128:
          {{23.02.2018 10:54:36 stdout: }}
          23.02.2018 10:54:36 stderr: fatal: Not a git repository (or any of the parent directories): .git
          {{23.02.2018 10:54:36 }}
          23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903)
          23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1871)
          23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1867)
          23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1512)
          23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1524)
          23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:718)
          23.02.2018 10:54:36 at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.GitBlamer.getHead(GitBlamer.java:70)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.GitBlamer.loadBlameResultsForFiles(GitBlamer.java:58)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.GitBlamer.blame(GitBlamer.java:52)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer$1.invoke(AbstractBlamer.java:66)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer$1.invoke(AbstractBlamer.java:63)
          23.02.2018 10:54:36 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
          23.02.2018 10:54:36 at hudson.remoting.UserRequest.perform(UserRequest.java:153)
          23.02.2018 10:54:36 at hudson.remoting.UserRequest.perform(UserRequest.java:50)
          23.02.2018 10:54:36 at hudson.remoting.Request$2.run(Request.java:336)
          23.02.2018 10:54:36 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          23.02.2018 10:54:36 at java.util.concurrent.FutureTask.run(Unknown Source)
          23.02.2018 10:54:36 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          23.02.2018 10:54:36 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          23.02.2018 10:54:36 at hudson.remoting.Engine$1$1.run(Engine.java:94)
          23.02.2018 10:54:36 at java.lang.Thread.run(Unknown Source)
          23.02.2018 10:54:36 at ......remote call to JNLP4-connect connection from 10.131.142.143/10.131.142.143:50738(Native Method)
          23.02.2018 10:54:36 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
          23.02.2018 10:54:36 at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
          23.02.2018 10:54:36 at hudson.remoting.Channel.call(Channel.java:830)
          23.02.2018 10:54:36 at hudson.FilePath.act(FilePath.java:985)
          23.02.2018 10:54:36 at hudson.FilePath.act(FilePath.java:974)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer.invokeBlamer(AbstractBlamer.java:63)
          23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer.blame(AbstractBlamer.java:49)
          23.02.2018 10:54:36 at hudson.plugins.analysis.core.HealthAwarePublisher.blame(HealthAwarePublisher.java:109)
          23.02.2018 10:54:36 at hudson.plugins.tasks.TasksPublisher.perform(TasksPublisher.java:187)
          23.02.2018 10:54:36 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:69)
          23.02.2018 10:54:36 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:298)
          23.02.2018 10:54:36 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
          23.02.2018 10:54:36 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          23.02.2018 10:54:36 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
          23.02.2018 10:54:36 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
          23.02.2018 10:54:36 at hudson.model.Build$BuildExecution.post2(Build.java:186)
          23.02.2018 10:54:36 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
          23.02.2018 10:54:36 at hudson.model.Run.execute(Run.java:1753)
          23.02.2018 10:54:36 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          23.02.2018 10:54:36 at hudson.model.ResourceController.execute(ResourceController.java:98)
          23.02.2018 10:54:36 at hudson.model.Executor.run(Executor.java:405)
          23.02.2018 10:54:36 Build step 'Suche im Arbeitsbereich nach offenen Punkten' marked build as failure

          Christian Häussler added a comment - The issue is not resolved. Job-Log: 23.02.2018 10:54:36 <Git Blamer> Using GitBlamer to create author and commit information for all warnings. 23.02.2018 10:54:36 <Git Blamer> Getting blame results for all files in E:\SCM/WKS/hus/HUS GEVO Glas. 23.02.2018 10:54:36 > E:\Software\Git-2.9.2\cmd\git.exe rev-parse "1ff17b3847091fe15639bda58069530615ecdad1^{commit}" # timeout=10 23.02.2018 10:54:36 ERROR: Build step failed with exception 23.02.2018 10:54:36 hudson.plugins.git.GitException: Command "E:\Software\Git-2.9.2\cmd\git.exe rev-parse "1ff17b3847091fe15639bda58069530615ecdad1^{commit}"" returned status code 128: {{ 23.02.2018 10:54:36 stdout: }} 23.02.2018 10:54:36 stderr: fatal: Not a git repository (or any of the parent directories): .git {{ 23.02.2018 10:54:36 }} 23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1903) 23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1871) 23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1867) 23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1512) 23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1524) 23.02.2018 10:54:36 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:718) 23.02.2018 10:54:36 at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.GitBlamer.getHead(GitBlamer.java:70) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.GitBlamer.loadBlameResultsForFiles(GitBlamer.java:58) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.GitBlamer.blame(GitBlamer.java:52) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer$1.invoke(AbstractBlamer.java:66) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer$1.invoke(AbstractBlamer.java:63) 23.02.2018 10:54:36 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) 23.02.2018 10:54:36 at hudson.remoting.UserRequest.perform(UserRequest.java:153) 23.02.2018 10:54:36 at hudson.remoting.UserRequest.perform(UserRequest.java:50) 23.02.2018 10:54:36 at hudson.remoting.Request$2.run(Request.java:336) 23.02.2018 10:54:36 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 23.02.2018 10:54:36 at java.util.concurrent.FutureTask.run(Unknown Source) 23.02.2018 10:54:36 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 23.02.2018 10:54:36 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 23.02.2018 10:54:36 at hudson.remoting.Engine$1$1.run(Engine.java:94) 23.02.2018 10:54:36 at java.lang.Thread.run(Unknown Source) 23.02.2018 10:54:36 at ......remote call to JNLP4-connect connection from 10.131.142.143/10.131.142.143:50738(Native Method) 23.02.2018 10:54:36 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545) 23.02.2018 10:54:36 at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) 23.02.2018 10:54:36 at hudson.remoting.Channel.call(Channel.java:830) 23.02.2018 10:54:36 at hudson.FilePath.act(FilePath.java:985) 23.02.2018 10:54:36 at hudson.FilePath.act(FilePath.java:974) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer.invokeBlamer(AbstractBlamer.java:63) 23.02.2018 10:54:36 at hudson.plugins.analysis.util.AbstractBlamer.blame(AbstractBlamer.java:49) 23.02.2018 10:54:36 at hudson.plugins.analysis.core.HealthAwarePublisher.blame(HealthAwarePublisher.java:109) 23.02.2018 10:54:36 at hudson.plugins.tasks.TasksPublisher.perform(TasksPublisher.java:187) 23.02.2018 10:54:36 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:69) 23.02.2018 10:54:36 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:298) 23.02.2018 10:54:36 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 23.02.2018 10:54:36 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 23.02.2018 10:54:36 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) 23.02.2018 10:54:36 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) 23.02.2018 10:54:36 at hudson.model.Build$BuildExecution.post2(Build.java:186) 23.02.2018 10:54:36 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) 23.02.2018 10:54:36 at hudson.model.Run.execute(Run.java:1753) 23.02.2018 10:54:36 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 23.02.2018 10:54:36 at hudson.model.ResourceController.execute(ResourceController.java:98) 23.02.2018 10:54:36 at hudson.model.Executor.run(Executor.java:405) 23.02.2018 10:54:36 Build step 'Suche im Arbeitsbereich nach offenen Punkten' marked build as failure

          It would be good if the hiring was at the job Level.

          Christian Häussler added a comment - It would be good if the hiring was at the job Level.

          Ulli Hafner added a comment -

          I'm not sure if I'm missing something but one of my jobs works quite well in a sub directory now. (will be part of 5.0.0 beta 2).

          Ulli Hafner added a comment - I'm not sure if I'm missing something but one of my jobs works quite well in a sub directory now. (will be part of 5.0.0 beta 2).

            drulli Ulli Hafner
            it12lsp Christian Häussler
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: