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

Git plugin "Merge before build" option with concurrent build cause git lock issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      The git extension h.p.g.e.PreBuildMerge Merge before build is using master workspace to try merging git branches.

      But if executed concurrently this can cause concurrent access to git lock file stderr: fatal: Unable to create '/var/jenkins_home/workspace/pipeline-foo@script/.git/index.lock': File exists.

      Quick look at it maybe possible options/ideas:

      • mark the extension requiresWorkspaceForPolling
      • override change method getWorkingDirectory to return a new directory if context.isConcurrentBuild()
      • override decorateCheckoutCommand to use different directory

            Unassigned Unassigned
            olamy Olivier Lamy
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: