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

Failure to check out commit from a closed & reopened PR

XMLWordPrintable

      Steps to reproduce the bug

      With a job associated to a PR (previously indexed) and everything (credentials, webhooks, etc) configured in a right way...

      1. Push a new commit to the PR. It will build successfully.
      2. Push a new commit to the master branch (I'm supossing that the PR was done against this branch).
      3. Close and open the PR. The PR won't be built because there are not changes in the PR.
      4. Press on "Build Now" and ....
      Started by user anonymous
      Connecting to GitHub using recena/****** (30a07b2797849568e92313249f082c813566df38)
       > git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from 2 remote Git repositories
       > git config remote.origin.url https://github.com/recena/test-private.git # timeout=10
      Fetching upstream changes from https://github.com/recena/test-private.git
       > git --version # timeout=10
      using .gitcredentials to set credentials
       > git config --local credential.username recena # timeout=10
       > git config --local credential.helper store --file=/var/folders/y_/9z0ktk9d2lxcs18kw7l10h9w0000gn/T/git2629912066994054356.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/recena/test-private.git +refs/heads/*:refs/remotes/origin/*
       > git config --local --remove-section credential # timeout=10
       > git config remote.origin1.url https://github.com/recena/test-private.git # timeout=10
      Fetching upstream changes from https://github.com/recena/test-private.git
      using .gitcredentials to set credentials
       > git config --local credential.username recena # timeout=10
       > git config --local credential.helper store --file=/var/folders/y_/9z0ktk9d2lxcs18kw7l10h9w0000gn/T/git4925866332964316725.credentials # timeout=10
       > git -c core.askpass=true fetch --tags --progress https://github.com/recena/test-private.git +refs/pull/*/merge:refs/remotes/origin/pr/*
       > git config --local --remove-section credential # timeout=10
      Checking out Revision e6cf85ada16bf5718e81add62576751155aeeab3 (PR-1)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f e6cf85ada16bf5718e81add62576751155aeeab3
      
      GitHub has been notified of this commit’s build result
      
      hudson.plugins.git.GitException: Could not checkout e6cf85ada16bf5718e81add62576751155aeeab3
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1983)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1081)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:109)
      	at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:87)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:206)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:381)
      Caused by: hudson.plugins.git.GitException: Command "git checkout -f e6cf85ada16bf5718e81add62576751155aeeab3" returned status code 128:
      stdout: 
      stderr: fatal: reference is not a tree: e6cf85ada16bf5718e81add62576751155aeeab3
      
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1710)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:63)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:1975)
      	... 7 more
      Finished: FAILURE
      

            jglick Jesse Glick
            recena Manuel Recena Soto
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: