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

Fail to sparse checkout folder


    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • git-plugin
    • Node: Win10
      Jenkins: 2.387.1
      Git-Plugin: 5.0.0

      This sparse chechout config shall only checkout 'my_path' but nothing is checkout. The log do not show any sparse checkout configuration which could intigate that only 'my_path' will be checkout.

      checkout scmGit(
          branches: [[name: "refs/heads/${env.BRANCH_NAME}"]],
          extensions: [
                  $class: 'SparseCheckoutPaths',
                  sparseCheckoutPaths: [
                      [path: 'my_path']
          userRemoteConfigs: [[credentialsId: 'my_cred_id', url: "my_url"]]

      creates this log:

      The recommended git tool is: git
      using credential my_cred_id
      Fetching changes from the remote Git repository
      Cleaning workspace
       > git rev-parse --resolve-git-dir d:\my_path\.git # timeout=10
       > git config remote.origin.url https://my_repo.git # timeout=10
       > git rev-parse --verify HEAD # timeout=10
      Resetting working tree
       > git reset --hard # timeout=10
       > git clean -fdx # timeout=10
      Fetching upstream changes from https://my_repo.git
       > git --version # timeout=10
       > git --version # 'git version 2.40.0.windows.1'
      using GIT_ASKPASS to set credentials my cred
       > git fetch --tags --force --progress -- https://my_repo.git +refs/heads/*:refs/remotes/origin/* # timeout=10
      Checking out Revision 09f52abbb863f29eb0c01cf340e50fc739e95185 (refs/remotes/origin/my_branch)
       > git rev-parse "refs/remotes/origin/my_branch^{commit}" # timeout=10
       > git config core.sparsecheckout # timeout=10
       > git read-tree -mu HEAD # timeout=10
       > git checkout -f 09f52abbb863f29eb0c01cf340e50fc739e95185 # timeout=10
      Commit message: "My message"


            Unassigned Unassigned
            eugenskt Eugen Kleinschmidt
            0 Vote for this issue
            2 Start watching this issue