Giter Club home page Giter Club logo

Comments (17)

kleini avatar kleini commented on August 13, 2024 1

Created #39 to get this fixed.

from docker-agent.

kleini avatar kleini commented on August 13, 2024

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.

oleg-nenashev avatar oleg-nenashev commented on August 13, 2024

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

WDYT @carlossg @ndeloof ?

from docker-agent.

ndeloof avatar ndeloof commented on August 13, 2024

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.

kleini avatar kleini commented on August 13, 2024

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.

jeff-knurek avatar jeff-knurek commented on August 13, 2024

@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.

kleini avatar kleini commented on August 13, 2024

@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.

kleini avatar kleini commented on August 13, 2024

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.

ndeloof avatar ndeloof commented on August 13, 2024

https://issues.jenkins-ci.org/browse/JENKINS-30600

from docker-agent.

kleini avatar kleini commented on August 13, 2024

@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.

ndeloof avatar ndeloof commented on August 13, 2024

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.

kleini avatar kleini commented on August 13, 2024

@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.

oleg-nenashev avatar oleg-nenashev commented on August 13, 2024

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.

MarkEWaite avatar MarkEWaite commented on August 13, 2024

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.

kleini avatar kleini commented on August 13, 2024

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.

ndeloof avatar ndeloof commented on August 13, 2024

@kleini as git is actually installed by parent image(s), adding git-lfs should be proposed there

from docker-agent.

lemeurherve avatar lemeurherve commented on August 13, 2024

git-lfs has been added to the docker-agent parent image in #58.

from docker-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.