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

Error while on Pull Request Branch (git rev error)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Ubuntu 20.04.4 LTS, Jenkins 2.332.1, plugin version 711.vdfef37cda_816,

      When branch changes to PR it always fails with message that I attached in 'logs_from_PR_jenkins.txt" file.

      To reproduce: Configure project as a multibranch pipeline, setup Bitbucket as a source of git, create branch then create Pull Request from it.

       

          [JENKINS-68184] Error while on Pull Request Branch (git rev error)

          Maciej Sikora created issue -
          Maciej Sikora made changes -
          Description Original: When branch changes to PR it always fails with message that I attached in 'logs_from_PR_jenkins.txt" file.

          To reproduce: Configure project as a multibranch pipeline, setup Bitbucket as a source of git, create branch then create Pull Request from it.
          New: When branch changes to PR it always fails with message that I attached in 'logs_from_PR_jenkins.txt" file.

          To reproduce: Configure project as a multibranch pipeline, setup Bitbucket as a source of git, create branch then create Pull Request from it.

          ```


          Loading library LIBRARY_LINK@origin/PR-1352
          Attempting to resolve origin/PR-1352 from remote references...
           > git --version # timeout=10
           > git --version # 'git version 2.25.1'
          using GIT_ASKPASS to set credentials
           > git ls-remote -h -- LINK_TO_BITBUCKET_".GIT"_FILE # timeout=10
          Could not find origin/PR-1352 in remote references. Pulling heads to local for deep search...
           > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-HASH/.git # timeout=10
          Setting origin to LINK_TO_BITBUCKET_".GIT"_FILE
           > git config remote.origin.url LINK_TO_BITBUCKET_".GIT"_FILE # timeout=10
          Fetching origin...
          Fetching upstream changes from origin
           > git --version # timeout=10
           > git --version # 'git version 2.25.1'
           > git config --get remote.origin.url # timeout=10
          using GIT_ASKPASS to set credentials
           > git fetch --tags --force --progress -- origin +refs/pull-requests/*/merge:refs/remotes/origin/PR-* +refs/heads/master:refs/remotes/origin/master +refs/heads/*:refs/remotes/origin/* # timeout=10
           > git rev-parse origin/PR-1352^\{commit} # timeout=10
          ERROR: Could not resolve origin/PR-1352
          hudson.plugins.git.GitException: Command "git rev-parse origin/PR-1352^\{commit}" returned status code 128:
          stdout: origin/PR-1352^\{commit}

          stderr: fatal: ambiguous argument 'origin/PR-1352^\{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'

          ```
          Maciej Sikora made changes -
          Description Original: When branch changes to PR it always fails with message that I attached in 'logs_from_PR_jenkins.txt" file.

          To reproduce: Configure project as a multibranch pipeline, setup Bitbucket as a source of git, create branch then create Pull Request from it.

          ```


          Loading library LIBRARY_LINK@origin/PR-1352
          Attempting to resolve origin/PR-1352 from remote references...
           > git --version # timeout=10
           > git --version # 'git version 2.25.1'
          using GIT_ASKPASS to set credentials
           > git ls-remote -h -- LINK_TO_BITBUCKET_".GIT"_FILE # timeout=10
          Could not find origin/PR-1352 in remote references. Pulling heads to local for deep search...
           > git rev-parse --resolve-git-dir /var/lib/jenkins/caches/git-HASH/.git # timeout=10
          Setting origin to LINK_TO_BITBUCKET_".GIT"_FILE
           > git config remote.origin.url LINK_TO_BITBUCKET_".GIT"_FILE # timeout=10
          Fetching origin...
          Fetching upstream changes from origin
           > git --version # timeout=10
           > git --version # 'git version 2.25.1'
           > git config --get remote.origin.url # timeout=10
          using GIT_ASKPASS to set credentials
           > git fetch --tags --force --progress -- origin +refs/pull-requests/*/merge:refs/remotes/origin/PR-* +refs/heads/master:refs/remotes/origin/master +refs/heads/*:refs/remotes/origin/* # timeout=10
           > git rev-parse origin/PR-1352^\{commit} # timeout=10
          ERROR: Could not resolve origin/PR-1352
          hudson.plugins.git.GitException: Command "git rev-parse origin/PR-1352^\{commit}" returned status code 128:
          stdout: origin/PR-1352^\{commit}

          stderr: fatal: ambiguous argument 'origin/PR-1352^\{commit}': unknown revision or path not in the working tree.
          Use '--' to separate paths from revisions, like this:
          'git <command> [<revision>...] -- [<file>...]'

          ```
          New: When branch changes to PR it always fails with message that I attached in 'logs_from_PR_jenkins.txt" file.

          To reproduce: Configure project as a multibranch pipeline, setup Bitbucket as a source of git, create branch then create Pull Request from it.

           

            Unassigned Unassigned
            maciejsikora2302 Maciej Sikora
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: