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

pipeline scripts to git clone a LFS project from github

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • 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

          fireson fireson li created issue -
          fireson fireson li made changes -
          Field Original Value New Value
          Description  
          h2. *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 issue , seems there is not a very clear reply, thanks.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
          node("cm-linux") {

          try {

          def allPushIdc="Y"
          stage('CNA 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('CNA selenium auto deploy: package the code') {
          sh 'pwd'
          sh 'ls -lta'
          sh 'tar -cvf cna_selenium.tar ./'
          sh 'bzip2 cna_selenium.tar'
          }

          stage('CNA selenium auto deploy: copy the package to target server') {
          sshagent(credentials: ['my id']) {
          sh 'shell cmds'
          }
          }

          }

          catch (any) {
          currentBuild.result = 'FAILURE'
          throw any
          }

          finally {
          step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'my email address', sendToIndividuals: true])
          }

          }
          {panel}
           

           

           
           
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
          node("cm-linux") {

          try {

          def allPushIdc="Y"
           stage('CNA selenium auto deploy: Checkout the codes from GitHub') {
           sshagent(credentials: ['my id'])
          Unknown macro: \{ sh ''' rm -rf ./* rm -rf .git/ git init ''' checkout scm}
          }

          stage('CNA selenium auto deploy: package the code')
          Unknown macro: \{ sh 'pwd' sh 'ls -lta' sh 'tar -cvf cna_selenium.tar ./' sh 'bzip2 cna_selenium.tar' }
          stage('CNA selenium auto deploy: copy the package to target server') {
           sshagent(credentials: ['my id'])
          Unknown macro: \{ sh 'shell cmds' }
          }

          }

          catch (any)
          Unknown macro: \{ currentBuild.result = 'FAILURE' throw any }
          finally
          Unknown macro: \{ step([$class}
          }
          {panel}
           

           

           
          fireson fireson li made changes -
          Description  
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
          node("cm-linux") {

          try {

          def allPushIdc="Y"
           stage('CNA selenium auto deploy: Checkout the codes from GitHub') {
           sshagent(credentials: ['my id'])
          Unknown macro: \{ sh ''' rm -rf ./* rm -rf .git/ git init ''' checkout scm}
          }

          stage('CNA selenium auto deploy: package the code')
          Unknown macro: \{ sh 'pwd' sh 'ls -lta' sh 'tar -cvf cna_selenium.tar ./' sh 'bzip2 cna_selenium.tar' }
          stage('CNA selenium auto deploy: copy the package to target server') {
           sshagent(credentials: ['my id'])
          Unknown macro: \{ sh 'shell cmds' }
          }

          }

          catch (any)
          Unknown macro: \{ currentBuild.result = 'FAILURE' throw any }
          finally
          Unknown macro: \{ step([$class}
          }
          {panel}
           

           

           
           
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
          node("cm-linux") {

          try {

          def allPushIdc="Y"
           stage('selenium auto deploy: Checkout the codes from GitHub')
          Unknown macro: \{ sshagent(credentials}
          }

          stage('selenium auto deploy: package the code')
           Unknown macro: \{ sh 'pwd' sh 'ls -lta' sh 'tar -cvf cna_selenium.tar ./' sh 'bzip2 cna_selenium.tar' }
           stage('selenium auto deploy: copy the package to target server')
          Unknown macro: \{ sshagent(credentials}
          }

          }

          catch (any)
           Unknown macro: \{ currentBuild.result = 'FAILURE' throw any }
           finally
           Unknown macro: \{ step([$class}
           }
          {panel}
           

           

           
          fireson fireson li made changes -
          Description  
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
          node("cm-linux") {

          try {

          def allPushIdc="Y"
           stage('selenium auto deploy: Checkout the codes from GitHub')
          Unknown macro: \{ sshagent(credentials}
          }

          stage('selenium auto deploy: package the code')
           Unknown macro: \{ sh 'pwd' sh 'ls -lta' sh 'tar -cvf cna_selenium.tar ./' sh 'bzip2 cna_selenium.tar' }
           stage('selenium auto deploy: copy the package to target server')
          Unknown macro: \{ sshagent(credentials}
          }

          }

          catch (any)
           Unknown macro: \{ currentBuild.result = 'FAILURE' throw any }
           finally
           Unknown macro: \{ step([$class}
           }
          {panel}
           

           

           
           
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=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])
          }

          }
          {panel}
           

           

           
          fireson fireson li made changes -
          Description  
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=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])
          }

          }
          {panel}
           

           

           
           
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=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])
          }

          }
          {panel}
           

           

           
          fireson fireson li made changes -
          Description  
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=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])
          }

          }
          {panel}
           

           

           
           
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
           {panel}
           
          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])
          }

          }

           

           
          fireson fireson li made changes -
          Description  
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {panel:title=My codes:}
           {panel}
           
          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])
          }

          }

           

           
           
          h2. *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.

          !image-2019-03-15-12-34-25-600.png!

          !image-2019-03-15-11-52-03-471.png!

          !image-2019-03-15-12-24-03-351.png!
          {code:java}
          //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])
          }}
          {code}
           

            People

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

              Dates

              • Created:
                Updated: