From 7acd9305df524818f7b7ed819ae7afebd059416b Mon Sep 17 00:00:00 2001 From: Papapetrou Patroklos <1743100+ppapapetrou76@users.noreply.github.com> Date: Wed, 18 Feb 2026 18:58:38 +0200 Subject: [PATCH] chore: install git-lfs 3.7.1 version using an install script (#26465) Signed-off-by: Patroklos Papapetrou Co-authored-by: Nitish Kumar --- Dockerfile | 7 ++++--- Dockerfile.tilt | 4 ++-- .../git-lfs-linux-amd64-v3.7.1.tar.gz.sha256 | 1 + .../git-lfs-linux-arm64-v3.7.1.tar.gz.sha256 | 1 + hack/installers/install-git-lfs.sh | 12 ++++++++++++ hack/tool-versions.sh | 1 + test/container/Dockerfile | 2 +- 7 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 hack/installers/checksums/git-lfs-linux-amd64-v3.7.1.tar.gz.sha256 create mode 100644 hack/installers/checksums/git-lfs-linux-arm64-v3.7.1.tar.gz.sha256 create mode 100755 hack/installers/install-git-lfs.sh diff --git a/Dockerfile b/Dockerfile index 222c0eec48..ad01b630ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ unzip \ fcgiwrap \ git \ - git-lfs \ make \ wget \ gcc \ @@ -29,7 +28,8 @@ COPY hack/install.sh hack/tool-versions.sh ./ COPY hack/installers installers RUN ./install.sh helm && \ - INSTALL_PATH=/usr/local/bin ./install.sh kustomize + INSTALL_PATH=/usr/local/bin ./install.sh kustomize && \ + ./install.sh git-lfs #################################################################################################### # Argo CD Base - used as the base for both the release and dev argocd images @@ -51,7 +51,7 @@ RUN groupadd -g $ARGOCD_USER_ID argocd && \ apt-get update && \ apt-get dist-upgrade -y && \ apt-get install --no-install-recommends -y \ - git git-lfs tini ca-certificates gpg gpg-agent tzdata connect-proxy openssh-client && \ + git tini ca-certificates gpg gpg-agent tzdata connect-proxy openssh-client && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* @@ -61,6 +61,7 @@ COPY hack/gpg-wrapper.sh \ /usr/local/bin/ COPY --from=builder /usr/local/bin/helm /usr/local/bin/helm COPY --from=builder /usr/local/bin/kustomize /usr/local/bin/kustomize +COPY --from=builder /usr/local/bin/git-lfs /usr/local/bin/git-lfs # keep uid_entrypoint.sh for backward compatibility RUN ln -s /usr/local/bin/entrypoint.sh /usr/local/bin/uid_entrypoint.sh diff --git a/Dockerfile.tilt b/Dockerfile.tilt index b733dfc127..ffed1c60a5 100644 --- a/Dockerfile.tilt +++ b/Dockerfile.tilt @@ -11,7 +11,6 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ unzip \ fcgiwrap \ git \ - git-lfs \ make \ wget \ gcc \ @@ -28,7 +27,8 @@ COPY hack/install.sh hack/tool-versions.sh ./ COPY hack/installers installers RUN ./install.sh helm && \ - INSTALL_PATH=/usr/local/bin ./install.sh kustomize + INSTALL_PATH=/usr/local/bin ./install.sh kustomize && \ + ./install.sh git-lfs COPY hack/gpg-wrapper.sh \ hack/git-verify-wrapper.sh \ diff --git a/hack/installers/checksums/git-lfs-linux-amd64-v3.7.1.tar.gz.sha256 b/hack/installers/checksums/git-lfs-linux-amd64-v3.7.1.tar.gz.sha256 new file mode 100644 index 0000000000..96c21820b6 --- /dev/null +++ b/hack/installers/checksums/git-lfs-linux-amd64-v3.7.1.tar.gz.sha256 @@ -0,0 +1 @@ +1c0b6ee5200ca708c5cebebb18fdeb0e1c98f1af5c1a9cba205a4c0ab5a5ec08 git-lfs-linux-amd64-v3.7.1.tar.gz diff --git a/hack/installers/checksums/git-lfs-linux-arm64-v3.7.1.tar.gz.sha256 b/hack/installers/checksums/git-lfs-linux-arm64-v3.7.1.tar.gz.sha256 new file mode 100644 index 0000000000..327275ee29 --- /dev/null +++ b/hack/installers/checksums/git-lfs-linux-arm64-v3.7.1.tar.gz.sha256 @@ -0,0 +1 @@ +73a9c90eeb4312133a63c3eaee0c38c019ea7bfa0953d174809d25b18588dd8d git-lfs-linux-arm64-v3.7.1.tar.gz diff --git a/hack/installers/install-git-lfs.sh b/hack/installers/install-git-lfs.sh new file mode 100755 index 0000000000..90bbce22a1 --- /dev/null +++ b/hack/installers/install-git-lfs.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -eux -o pipefail + +. "$(dirname "$0")"/../tool-versions.sh + +export TARGET_FILE=git-lfs-${INSTALL_OS}-${ARCHITECTURE}-v${git_lfs_version}.tar.gz + +[ -e "$DOWNLOADS/${TARGET_FILE}" ] || curl -sLf --retry 3 -o "$DOWNLOADS/${TARGET_FILE}" "https://github.com/git-lfs/git-lfs/releases/download/v${git_lfs_version}/${TARGET_FILE}" +"$(dirname "$0")"/compare-chksum.sh +mkdir -p /tmp/git-lfs && tar -C /tmp/git-lfs --strip-components=1 -xzf "$DOWNLOADS/${TARGET_FILE}" +sudo install -m 0755 "/tmp/git-lfs/git-lfs" "$BIN/git-lfs" +git-lfs version diff --git a/hack/tool-versions.sh b/hack/tool-versions.sh index 4f1c67b864..84bec7b77c 100644 --- a/hack/tool-versions.sh +++ b/hack/tool-versions.sh @@ -15,3 +15,4 @@ helm3_version=3.19.4 kustomize5_version=5.8.1 protoc_version=29.3 oras_version=1.2.0 +git_lfs_version=3.7.1 diff --git a/test/container/Dockerfile b/test/container/Dockerfile index af13296b5f..0ebe631e00 100644 --- a/test/container/Dockerfile +++ b/test/container/Dockerfile @@ -28,7 +28,6 @@ RUN apt-get update && apt-get install --fix-missing --no-install-recommends -y nginx \ fcgiwrap \ git \ - git-lfs \ gpg \ gpg-agent \ jq \ @@ -71,6 +70,7 @@ RUN ./install.sh helm && \ ./install.sh codegen-go-tools && \ ./install.sh lint-tools && \ ./install.sh gotestsum && \ + ./install.sh git-lfs && \ go install github.com/mattn/goreman@latest && \ go install github.com/kisielk/godepgraph@latest && \ go install github.com/jstemmer/go-junit-report@latest && \