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

pipeline scripts to git clone a LFS project from github

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Not A Defect
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
      CloudBees Jenkins Platform Client Master 2.89.4.2
    • Similar Issues:

      Description

       

      Question:

      we try to use pipeline to clone a LFS project from github, but the large files checkout to be 1kb, in fact it is 600mb+, i checked our codes, it used tool "GIT_linux-1.8.0.2", i recalled that it at least need GIT version>=1.8.2.

      So, if we can't update the git linux tool version, any code like "extensions: [$class:'GitLFSPull']" add to my codes can make git clone the LFS project?

       

      Note: i checked all the jenkins history issues here , seems there isn't a very clear reply, thanks.

      //My codes
      
      node("cm-linux") {try {def allPushIdc="Y"
      stage(' selenium auto deploy: Checkout the codes from GitHub') {
      sshagent(credentials: ['my id']) {
      sh '''
      rm -rf ./*
      rm -rf .git/
      git init
      '''
      checkout scm: [$class: 'GitSCM', branches: [[name: '*/master']], gitTool: 'GIT_linux-1.8.0.2', userRemoteConfigs: [[credentialsId: 'my id', url: 'my url']]]
      }
      }stage(' selenium auto deploy: package the code') {
      sh 'pwd'
      sh 'ls -lta'
      sh 'tar -cvf _selenium.tar ./'
      sh 'bzip2 _selenium.tar'
      }stage(' selenium auto deploy: copy the package to target server') {
      sshagent(credentials: ['my id']) {
      "shell cmds put here"
      }
      }}catch (any) {
      currentBuild.result = 'FAILURE'
      throw any 
      }finally {
      step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'my email', sendToIndividuals: true])
      }}
      

       

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          If the command line git version you are using does not support git large files (git LFS), then the git plugin and the Jenkins pipeline cannot make it support them.

          Upgrade to a more recent version of command line git.

          If you didn't need LFS support, you could also enable JGit on your Jenkins installation and use JGit. However, the git client plugin JGit implementation does not support git LFS.

          Show
          markewaite Mark Waite added a comment - If the command line git version you are using does not support git large files (git LFS), then the git plugin and the Jenkins pipeline cannot make it support them. Upgrade to a more recent version of command line git. If you didn't need LFS support, you could also enable JGit on your Jenkins installation and use JGit. However, the git client plugin JGit implementation does not support git LFS.

            People

            • Assignee:
              Unassigned
              Reporter:
              fireson fireson li
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: