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

          Christian Häussler created issue -

          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
          Christian Häussler made changes -
          Description Original: 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??????
          New: 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??
          Christian Häussler made changes -
          Description Original: 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??
          New: 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??
          Ulli Hafner made changes -
          Summary Original: Using GitBlamer to create author and commit information for all warnings. New: GitBlamer does not work if git workspace is in subfolder

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

              Created:
              Updated:
              Resolved: