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

The ci-pipeline fails immediately with git.exe rev-parse "null^{commit}"" returned status code 128

XMLWordPrintable

      I used to do the following in the Jenkins file

       

      library identifier: "pipeline-helper@$env.BRANCH_NAME", retriever: modernSCM(
        [$class: 'GitSCMSource',
             remote: 'https://scm.sc.intra/scm/jenkins/pipeline-helper.git',
             credentialsId: 'bitbucket.service.user'
        ])
      
      defaultCipipelineMaven {
          nodes     = 'devops' /* label of jenkins nodes*/
          email     = 'yz@comapny.org'
      }
      

      The usage of `$env.BRANCH_NAME` made it easy to test changes of a feature branch of the `pipeline-helper` without that I had to manually change the branch identifier. This worked well until now where this suddenly results in an error

      ERROR: Could not resolve null
      hudson.plugins.git.GitException: Command "D:\jenkins\tools\git\bin\git.exe rev-parse "null^{commit}"" returned status code 128:
      stdout: null^{commit}
      stderr: fatal: ambiguous argument 'null^{commit}': unknown revision or path not in the working tree.
      Use '--' to separate paths from revisions, like this:
      'git <command> [<revision>...] -- [<file>...]'
      

      I recently updated from the previous LTS version 2.204 but not sure if that's when it started failing...

       

            Unassigned Unassigned
            papanito papanito
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: