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

pipeline scripts to git clone a LFS project from github

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Critical Critical
    • pipeline
    • None
    • CloudBees Jenkins Platform Client Master 2.89.4.2

       

      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])
      }}
      

       

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

              Created:
              Updated:
              Resolved: