[JIRA] (JENKINS-56573) pipeline scripts to git clone a LFS project from github

4 views
Skip to first unread message

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:40:01 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li created an issue
 
Jenkins / Bug JENKINS-56573
pipeline scripts to git clone a LFS project from github
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: image-2019-03-15-11-52-03-471.png, image-2019-03-15-12-24-03-351.png, image-2019-03-15-12-34-25-600.png
Components: pipeline
Created: 2019-03-15 04:39
Environment: CloudBees Jenkins Platform Client Master 2.89.4.2
Priority: Critical Critical
Reporter: fireson li

 

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.

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}

}

 

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:44:02 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li updated an issue
Change By: fireson li
 
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 issues here , seems there is not 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 : [$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')
{
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 : 'Mailer', notifyEveryUnstableBuild: true, recipients: 'my email address', sendToIndividuals: true])
}

}
{panel}
 

 

 

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:45:02 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li updated an issue
 
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 sshagent(credentials }
}

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' sshagent(credentials }

}

}

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

 

 

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:48:01 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li updated an issue
 
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 : ['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')

Unknown macro: \
{
sh 'pwd'
sh 'ls -lta'
sh 'tar -cvf cna_selenium _selenium .tar ./'
sh 'bzip2 cna_selenium _selenium .tar'
}

stage('selenium auto deploy: copy the package to target server')
Unknown macro: \
{
sshagent(credentials : ['my id']) {
"shell cmds put here"
}
}

}

catch (any)

Unknown macro: \
{
currentBuild.result = 'FAILURE'
throw any
}
finally
Unknown macro: \ finally {
step([$class : 'Mailer', notifyEveryUnstableBuild: true, recipients: 'my email', sendToIndividuals: true])
}

}
{panel}
 

 

 

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:49:01 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li updated an issue
 
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}
 

 

 

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:50:01 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li updated an issue
 
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 code : title= java}
//
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])
}
}

{code }

 

 

565175432@qq.com (JIRA)

unread,
Mar 15, 2019, 12:50:02 AM3/15/19
to jenkinsc...@googlegroups.com
fireson li updated an issue
 
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])
}

}
{panel}
 

 


 

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 25, 2019, 3:07:01 PM9/25/19
to jenkinsc...@googlegroups.com
Change By: Mark Waite
Status: Fixed but Unreleased Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mark.earl.waite@gmail.com (JIRA)

unread,
Sep 25, 2019, 3:07:03 PM9/25/19
to jenkinsc...@googlegroups.com
 

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.

Change By: Mark Waite
Status: Open Fixed but Unreleased
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages