0

This is a one off usage of git. We have very minimal usage of branches (there is a reason for that). So, its safe to assume that its only master branch. Now, for every potential release candidate. I am creating a tag on the master. And want jenkins to checkout the latest git tag. But jenkins/git doesn't seem to be able to find the 'git merge base' of the tags in the master branch. i have configured jenkins to get the latest tag as also described here

Here is a simple diagram of the git branch

enter image description here

This is the console error on jenkins.

 > git fetch --tags --progress https://some_gitrepo.git.git +refs/tags/*:refs/remotes/origin/tags/*
Seen branch in repository origin/master
Seen branch in repository origin/tags/v1.1
Seen branch in repository origin/tags/v1.1.8
Seen branch in repository origin/tags/v1.1.9
Seen 4 remote branches
FATAL: Error computing merge base
hudson.plugins.git.GitException: Error computing merge base
    at hudson.plugins.git.util.GitUtils.filterTipBranches(GitUtils.java:188)
    at hudson.plugins.git.util.DefaultBuildChooser.getAdvancedCandidateRevisions(DefaultBuildChooser.java:249)
    at hudson.plugins.git.util.DefaultBuildChooser.getCandidateRevisions(DefaultBuildChooser.java:53)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:995)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
    at hudson.model.Run.execute(Run.java:1738)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:410)

Why is the git not able to do so, as configured. I have the same setup working on a different instance of jenkins and a different git repo. Do i need to update the git version on this instance of jenkins?

git version: git version 1.7.1, Jenkins ver. 1.651.22.1 (CloudBees Jenkins Enterprise 16.06)

NOTE: i am not doing a shallow clone

Community
  • 1
  • 1
OK999
  • 1,353
  • 2
  • 19
  • 39

0 Answers0