Comments (17)
Created #39 to get this fixed.
from docker-agent.
I am not sure, whether this report is correct here or git-lfs should go into the https://github.com/jenkinsci/docker-slave image.
from docker-agent.
It should rather go to https://github.com/jenkinsci/docker-slave, but we probably should firstly agree that we bundle it. Commonly tools should be installed by extending the image, but maybe Git LFS module is a valid case since Git is bundled. Not sure tho
from docker-agent.
no opinion on this topic. parent openjdk
image bundle git, which doesn't make much sense, so I can't see any logic to offer guidance for installing git-lfs or not.
from docker-agent.
I tried to work around this issue now by using a separate Docker image having Git with LFS support installed. My pipeline code looks like the following
container('git-lfs') {
checkout scm
}
Unfortunately the Jenkins checkout DSL step either does not run on the surrounding container or uses some modified PATH environment, where git-lfs is not part of the path. I still get the same exception as mentioned above.
from docker-agent.
@kleini checkout scm
has an option for setting a LFS pull, [$class: "GitLFSPull"]
, have you tried that with your workaround?
even if you do, I expect you might still run into the same problem I did (with a slightly different use case):
https://issues.jenkins-ci.org/browse/JENKINS-46230?focusedCommentId=311081&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-311081
from docker-agent.
@jeff-knurek LFS pull is configured in the multibranch pipeline configuration. I get the same error as stated in my first comment. So I expect git to do a 'lfs pull origin' but git-lfs tool is not found although contained in the surrounding Docker container. I tested the Docker container by hand and there everything works. 'git-lfs' is contained in the same path as git itself:
# which git
/usr/bin/git
# which git-lfs
/usr/bin/git-lfs
Therefore the only possible answer, why this fails, is, that 'checkout scm' is running within the jnlp Docker container and not within the surrounded one. I am not sure, whether this makes sense and is wanted behaviour.
from docker-agent.
Okay, it does not seem to be possible to run the
checkout scm
DSL step on a different container. It always runs on the JNLP container. I extended the jenkins/jnlp-slave:alpine image with the git-lfs executable and then I am able to clone a Git repository using LFS.
So again the question: What is the best way to finally solve the whole issue? Do you like to extend the slave image with support for Git LFS or should it be possible to run the checkout DSL step on a different container than the jnlp container, that comes with Git and LFS?
from docker-agent.
https://issues.jenkins-ci.org/browse/JENKINS-30600
from docker-agent.
@ndeloof thank you very much. Will extend first the jenkins/jnlp-slave:alpine with git-lfs to solve my build issues and wait for some fix from your side.
from docker-agent.
my PR never has been accepted, so don't know what you mean by "from your side", but you might have to wait for a few :)
from docker-agent.
@ndeloof Jenkins stated to go the Kubernetes way. I tried to and failed when using Git LFS. This needs to be fixed somehow in Jenkins, Git plugin or used JNLP slaves. This is, what I will wait for, because it is unclear for me, how this should be fixed correctly in regard of https://jenkins.io/blog/2018/08/31/shifting-gears/.
from docker-agent.
I still believe that custom images are the way to go in general.
@MarkEWaite what is your opinion about git-lfs popularity? Does it worth including it to the standard image?
from docker-agent.
I think that git lfs should be considered a standard component just as we consider git a standard component. Too much hassle to add it after the fact.
from docker-agent.
Adding git-lfs afterwards is not a big deal. But I expect there multiple users to be out there, using Git LFS. Here is, how i solved adding git-lfs support to the image: https://gitlab.open-xchange.com/jenkins/jnlp-slave
Please advice whether and where I should open a pull request to get this into the upstream images. I think it would be best to add it to the https://github.com/jenkinsci/docker-slave image.
from docker-agent.
@kleini as git is actually installed by parent image(s), adding git-lfs should be proposed there
from docker-agent.
git-lfs
has been added to the docker-agent parent image in #58.
from docker-agent.
Related Issues (20)
- The publication job on trusted.ci.jenkins.io should fail if the tag is malformed
- Build both agent and inbound-agent container images in this repository HOT 13
- Windows agent does not work on AWS Fargate HOT 5
- Docker image for docker-inbound-agent from debian bullseye distribution based agent docker image HOT 1
- Usage: is "java -jar /usr/share/jenkins/agent.jar" up to date? HOT 12
- Add doc how to build the different images
- Rename this repository to reflect that it concerns both `agent` and `inbound-agent`? HOT 1
- NoClassDefFoundError: org/eclipse/jgit/internal/JGitText HOT 11
- README_agent.md links to dockerhub HOT 2
- updatecli is not working for updates to JDKs HOT 5
- Images are missing from the inbound-agent README
- DockerHub Description automated process is broken since 2 months (at least?) HOT 8
- [Windows] ci.jenkins.io build fails since 3 days HOT 5
- How can I build docker images from inside jenkins/agent HOT 1
- Jenkins agent exits immediately without any logs and error code 159 (RPI 4, aarch64, Raspbian 64 bit) HOT 27
- Generate smaller java runtime with jlink in Windows images HOT 2
- JDK 21 preview updatecli manifest is failing HOT 13
- Move JDK1 `linux/s390x` out of preview HOT 1
- Unable to build an extension of inbound-agent:*ltsc2019 HOT 3
- Add building documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-agent.