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

Git plugin cache branches and revision of old repo when new repo is added

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • git-plugin
    • None
    • Jenkins ver. 1.609.3
      Git plugin version 2.4.0
      CentOS 7
      Java SDK 1.8

      I have 2 repositories in Stash:

      • A - with 5 branches (feature/dev, feature/f1, feature/test-01, feature/test-02, feature/test-03)
      • B - with 2 branches. (master, feature/f1)
        First, I created a build job in Jenkins who poll source code from A.

        It works well.

      Then I change the repo to B in git setting and trigger the second build.

      As you can see from the screenshot, git-plugin somehow cached the previous branches of previous repo A and check them out. It then execute another build to checkout the branches of current repository B.

      It results in wrong branch checkout ,and cause code conflict. I think it is really critical if the wrong artifacts is deployed.

      Please have a look.

      Thank you for your attention

        1. build1.png
          build1.png
          44 kB
        2. build2.png
          build2.png
          52 kB

            tuyenlieukms Tuyen Lieu
            tuyenlieukms Tuyen Lieu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: