-
-
Notifications
You must be signed in to change notification settings - Fork 249
chore(linux): install git-lfs
from repository instead of Linux distribution packages
#1009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(linux): install git-lfs
from repository instead of Linux distribution packages
#1009
Conversation
…ribution packages
&& ln -sf /usr/share/jenkins/agent.jar /usr/share/jenkins/slave.jar | ||
|
||
ARG GIT_LFS_VERSION=3.7.0 | ||
RUN arch=$(uname -m | sed -e 's/x86_64/amd64/g' -e 's/aarch64/arm64/g' -e 's/armv7l/arm/g') \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this third sed
replacement pattern to Debian images which include Linux/arm/v7 architecture
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit question: wouldn't it work with dpkg --print-architecture
? (For arm64
it works, but I'm not sure for arm/v7
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested. What would be the benefit of using dpkg
instead of uname
in that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dpkg --print-architecture
(I'm not 100% sure of the flag, worth checking the doc.) is usually called when you expect a "Golang/Docker" CPU architecture string such as amd64
or arm64
instead of the Kernel designations from uname
.
It avoids doing tedious text search and replace techniques (whatever techniques: shell search/replace, sed
, awk
, perl
, etc.).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dduportal after testing, as dpkg
is not available in Alpine nor in UBI9 images, and as dpkg --print-architecture
returns armhf
for Linux/arm/v7 and thus still requires a sed
into arm
in that case, I propose to keep uname -m
in all images for uniformity.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the test checking we can, at least, instantiate the binary (Golang binary), the Alpine and Ubi implementations should be good (even if we have to be aware that we might break them since the static binary could rely on other libraries or packages) . But LGTM!
This PR installs
git-lfs
from its repository instead of relying on Linux distribution packages, to ensure we're getting the same version installed accross all images.Ref:
git-lfs
#1008I'll open another PR for updatecli manifest.
Testing done
make build test
Submitter checklist