ashis...@gmail.com schrieb am Donnerstag, 15. Juni 2023 um 20:19:54 UTC+2:

Hi All,

I'm getting this following error which is happening for a particular gerrit 
repo. The configuration is working for all other repos in my project but 
not in this particular one.





















*ERROR: [Thu Jun 15 17:55:03 UTC 2023] Could not update folder level 
actions from source c0628d20-0427-4a13-a81d-b22ef9bfe114[Thu Jun 15 
17:55:03 UTC 2023] Finished branch indexing. Indexing took 0.56 secFATAL: 
Failed to recompute children of 
test-seatregionhudson.plugins.git.GitException: Command "git fetch --tags 
--force --progress -- origin +refs/heads/*:refs/remotes/origin/* 
refs/changes/62/113962/4:refs/remotes/origin/62/113962/4 
refs/changes/85/115185/2:refs/remotes/origin/85/115185/2 
refs/changes/24/106224/4:refs/remotes/origin/24/106224/4" returned status 
code 128:stdout: stderr: remote: Counting objects: 1           fatal: 
protocol error: bad pack header at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
 
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
 
at 
org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623) 
at 
jenkins.plugins.gerrit.AbstractGerritSCMSource.doRetrieve(AbstractGerritSCMSource.java:670)
 
at 
jenkins.plugins.gerrit.AbstractGerritSCMSource.retrieveActions(AbstractGerritSCMSource.java:232)
 
at jenkins.scm.api.SCMSource.fetchActions(SCMSource.java:848) at 
jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:597) 
at 
com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:278)
 
at 
com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:166)
 
at 
jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1031)
 
at hudson.model.ResourceController.execute(ResourceController.java:101) at 
hudson.model.Executor.run(Executor.java:442)Finished: FAILURE*


Sounds more like a problem on the gerrit side. Maybe 
check 
https://confluence.atlassian.com/fishkb/git-indexing-fails-due-to-bad-pack-header-371360062.html
 
for one reason.
 

The multibranch pipeline catalog template is
multibranch:
  branchSource:
    gerrit:
      remote: ${ProjectRepositoryUrl}
      credentialsId: ${GitHTTPSCredentials}
      traits:
        - $class: ChangeDiscoveryTrait
          queryString: ''
        - $class: RefSpecsSCMSourceTrait
          templates:
          - value: '+refs/heads/*:refs/remotes/@{remote}/*'
        - $class: SubmoduleOptionTrait
          extension:
            disableSubmodules: false
            recursiveSubmodules: true
            parentCredentials: true  

and pipeline config is 
pipeline {
    /**###################### Agents Config ######################**/
    agent {
        kubernetes {
            inheritFrom "${PodName}"
        }
    }
    options {
        // This will checkout the changed repository that has triggered 
this pipeline to a sperate folder named "tmp_repository", to be used later 
in the build
        checkoutToSubdirectory('tmp_repository')
        buildDiscarder(logRotator(numToKeepStr: 'unlimited'))
    }

    /**###################### Stages ######################**/
    stages {
        /**###################### Gerrit Review Log 
######################**/
        stage('Init') {
            steps {
                script {
                    gerritReview message: "Build started: ${BUILD_URL}"
                }
            }
        }
        /**###################### Cloning Manifest Repository 
######################**/
        stage('Cloning Manifest Repo') {
            steps { // Executes on JNLP, no specific container required
                script {
                    echo "Cloning the Manifest repository: ${
ManifestRepoName}"
                    // This will checkout the manifest repository into a 
folder under the same name as the repository
                    dir("${ManifestRepoName}") {
                        checkout([
                        $class: 'GitSCM',
                        branches:
                        [[name: "*/${ManifestBranch}"]],
                        doGenerateSubmoduleConfigurations: false,
                        extensions: [[
                            $class: 'LocalBranch',
                            localBranch: '**'
                          ],[
                            $class: 'CleanBeforeCheckout',
                            deleteUntrackedNestedRepositories: false
                          ]],
                        submoduleCfg: [],
                        userRemoteConfigs: [[credentialsId: 
GitHTTPSCredentials, /*Netid credentials must be used instead of HTTPS 
tokens.*/
                                             url: ManifestRepoUrl]]
                        ])
                    }
                }
            }
        }
}


The multibranch indexing itself is not happening and it is unable to detect 
Gerrit branches/changes

Can someone assist on this

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/746e681f-5be7-40e7-ad64-0aa7d898453an%40googlegroups.com.

Reply via email to