Initialize Git LFS for jenkins user#2348
Conversation
dduportal
left a comment
There was a problem hiding this comment.
Hello 👋 thanks for this change request!
It looks like you're in the correct direction but there still have a few elements:
- Can you reference the issue describing the problem you're trying to solve please?
- Also: is the issue author aware and ok for you to take over this contribution?
- You only updated the Alpine Linux container image: you must also apply feature parity on all other images (Debian, Redhat, Windows, etc.)
- Can you add a test in the test harness (expecting the test to fail without this instruction, and passing in this PR)
| COPY --from=jre-and-war /war/jenkins.war /usr/share/jenkins/jenkins.war | ||
|
|
||
| USER ${user} | ||
| RUN git lfs install |
There was a problem hiding this comment.
| RUN git lfs install | |
| # Execute as 'jenkins' (or name specified with $user to avoid root-only setup) | |
| RUN git lfs install |
Nit: adding a comment ensures that this RUN instructions remains after the USER step
There was a problem hiding this comment.
issue #2348
Thanks for the feedback! I’ve now applied the same Git LFS initialization logic to the Alpine, Debian, and RHEL images where git-lfs is installed.
I’m also looking into the existing test harness to understand the best way to add coverage for this behavior.
There was a problem hiding this comment.
Thanks for the review and feedback!
I’ve now applied the Git LFS initialization change across the Alpine, Debian, and RHEL images where git-lfs is installed.
The Linux image test suites are passing successfully. I also noticed a failing Windows test in CI, though I currently do not have access to the detailed Jenkins logs to determine whether it is directly related to this change.
I’m continuing to look into the existing test harness for adding coverage around Git LFS initialization behavior.
There was a problem hiding this comment.
You have not pushed the last changes so we cannot see them
Git LFS was initialized before switching to the
jenkinsuser, which applies the configuration only for the root user.This change initializes Git LFS after switching to the
jenkinsuser so Git LFS configuration is available in the Jenkins runtime environment.