На шаге pre-stage не получается получить LFS файлы
goodwinvu opened this issue · 3 comments
Проблема в следующем - сборка валится на шаге pre-stage, судя по всему - не получается получить LFS файлы (с репозиториями без LFS - pre-stage проходит без проблем).
Правильно я понимаю, что это ошибка агента а не либы?
конец лога вот (после там идут пропуски шагов уже по ошибке):
> git rev-parse --resolve-git-dir /var/jenkins_home/caches/git-636940b106640d6d40b6c927263db2cd/.git # timeout=10
Setting origin to http://10.11.1.190:7080/root/AUN3.git
> git config remote.origin.url http://10.11.1.190:7080/root/AUN3.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
> git --version # timeout=10
> git --version # 'git version 2.30.2'
> git config --get remote.origin.url # timeout=10
using GIT_ASKPASS to set credentials jenkins доступ к корпоративному GitLAB
> git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10
Seen branch in repository origin/feature/pp_dev
Seen branch in repository origin/master
Seen branch in repository origin/om_master
Seen branch in repository origin/pp_master
Seen branch in repository origin/release/aun_type
Seen branch in repository origin/release/pp_dev
Seen 6 remote branches
Obtained Jenkinsfile from 063c78d7bf4235df633c16a520d9bb10f7e9ddca
Loading library jenkins-lib@v0.4.1
Attempting to resolve v0.4.1 from remote references...
> git --version # timeout=10
> git --version # 'git version 2.30.2'
using GIT_ASKPASS to set credentials токен доступа на GitHUB
> git ls-remote -h -- https://github.com/firstBitSemenovskaya/jenkins-lib.git # timeout=10
Could not find v0.4.1 in remote references. Pulling heads to local for deep search...
> git rev-parse --resolve-git-dir /var/jenkins_home/caches/git-9c03cf723b33cd6c727c7c9287fd0300/.git # timeout=10
Setting origin to https://github.com/firstBitSemenovskaya/jenkins-lib.git
> git config remote.origin.url https://github.com/firstBitSemenovskaya/jenkins-lib.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
> git --version # timeout=10
> git --version # 'git version 2.30.2'
> git config --get remote.origin.url # timeout=10
using GIT_ASKPASS to set credentials токен доступа на GitHUB
> git fetch --tags --force --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse v0.4.1^{commit} # timeout=10
> git branch -a -v --no-abbrev --contains c046dc92f73a2fe0d5032e0c8955844a12c377eb # timeout=10
Selected match: develop revision c046dc92f73a2fe0d5032e0c8955844a12c377eb
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
using credential jencins_github_token
> git rev-parse --resolve-git-dir /var/jenkins_home/workspace/AUN_feature_pp_dev@libs/jenkins-lib/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/firstBitSemenovskaya/jenkins-lib.git # timeout=10
Fetching without tags
Fetching upstream changes from https://github.com/firstBitSemenovskaya/jenkins-lib.git
> git --version # timeout=10
> git --version # 'git version 2.30.2'
using GIT_ASKPASS to set credentials токен доступа на GitHUB
> git fetch --no-tags --force --progress -- https://github.com/firstBitSemenovskaya/jenkins-lib.git +refs/heads/*:refs/remotes/origin/* # timeout=10
Checking out Revision c046dc92f73a2fe0d5032e0c8955844a12c377eb (develop)
> git config core.sparsecheckout # timeout=10
> git checkout -f c046dc92f73a2fe0d5032e0c8955844a12c377eb # timeout=10
Commit message: "Merge branch 'develop'"
> git rev-list --no-walk c046dc92f73a2fe0d5032e0c8955844a12c377eb # timeout=10
[Pipeline] Start of Pipeline
[Pipeline] timeout
Timeout set to expire in 2 hr 0 min
[Pipeline] {
[Pipeline] timestamps
[Pipeline] {
[Pipeline] stage
[Pipeline] { (pre-stage)
[Pipeline] node
18:31:02 Still waiting to schedule task
18:31:02 ‘agt-ature_pp_dev_10-12’ is offline
18:31:06 Running on agt-ature_pp_dev_10-12 in /home/jenkins/workspace/AUN_feature_pp_dev
[Pipeline] {
[Pipeline] checkout
18:31:07 The recommended git tool is: NONE
18:31:19 using credential jencins_gitlab_pass
18:31:19 Cloning the remote Git repository
18:31:19 Cloning with configured refspecs honoured and without tags
18:31:19 Cloning repository http://10.11.1.190:7080/root/AUN3.git
18:31:19 > git init /home/jenkins/workspace/AUN_feature_pp_dev # timeout=10
18:31:19 Fetching upstream changes from http://10.11.1.190:7080/root/AUN3.git
18:31:19 > git --version # timeout=10
18:31:19 > git --version # 'git version 2.30.2'
18:31:19 using GIT_ASKPASS to set credentials jenkins доступ к корпоративному GitLAB
18:31:19 > git fetch --no-tags --force --progress -- http://10.11.1.190:7080/root/AUN3.git +refs/heads/*:refs/remotes/origin/* # timeout=10
18:33:50 Avoid second fetch
18:33:50 Checking out Revision 063c78d7bf4235df633c16a520d9bb10f7e9ddca (feature/pp_dev)
18:33:50 > git config remote.origin.url http://10.11.1.190:7080/root/AUN3.git # timeout=10
18:33:50 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
18:33:50 > git config core.sparsecheckout # timeout=10
18:33:50 > git checkout -f 063c78d7bf4235df633c16a520d9bb10f7e9ddca # timeout=10
на шаге в логе вот это
hudson.plugins.git.GitException: Command "git checkout -f 063c78d7bf4235df633c16a520d9bb10f7e9ddca" returned status code 128:
stdout:
stderr: Downloading AUN/src/CommonTemplates/Драйвер1СПринтерЧеков/Template.addin (10 MB)
Error downloading object: AUN/src/CommonTemplates/Драйвер1СПринтерЧеков/Template.addin (fda6167): Smudge error: Error downloading AUN/src/CommonTemplates/Драйвер1СПринтерЧеков/Template.addin (fda6167ec4c0a551a22019239567eac70eb7ca12fc6e1bb49dc8edcbc213907b): batch response: Fatal error: Server error: http://10.11.1.190:7080/root/AUN3.git/info/lfs/objects/batch
Errors logged to /home/jenkins/workspace/AUN_feature_pp_dev/.git/lfs/logs/20211121T153714.970606425.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: AUN/src/CommonTemplates/Драйвер1СПринтерЧеков/Template.addin: smudge filter lfs failed
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2681)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$1100(CliGitAPIImpl.java:86)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2999)
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.0.0.2/10.0.0.2:46082
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1797)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1001)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at com.sun.proxy.$Proxy112.execute(Unknown Source)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1352)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused: hudson.plugins.git.GitException: Could not checkout 063c78d7bf4235df633c16a520d9bb10f7e9ddca
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:3023)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:160)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:153)
at hudson.remoting.UserRequest.perform(UserRequest.java:211)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:376)
at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:122)
at java.base/java.lang.Thread.run(Thread.java:832)
Finished: FAILURE
в .gitattributes присутствует
*.addin filter=lfs diff=lfs merge=lfs -text
и как я понимаю в логе этот шаблон - первый файл попавший по фильтру (пробовал их менять)
соответственно вопрос -
подскажите как работать с лфс правильно? агента собирал из соседнего тут репозитория (onec-docker)
Я что-то у вас в логе вообще не вижу активации LFS. Вы добавили дополнительный behavior "Git LFS pull after checkout"?
offtopic - новый пользователь библиотеки, ура! :)
а куда добавить? в свободной джобе есть такое, а тут pipeline собирается по супер Jenkinsfile в одну строку pipeline1c() :)
upd. блин, туплю, добавил
проверим
upd2. всё ок, спасибо за подсказку!