From 461907918dea18079d3f95df7cfae2df606e86da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 3 Apr 2026 09:52:39 +0200 Subject: [PATCH] kata-deploy: pin nydus-snapshotter via versions.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve externals.nydus-snapshotter version and url in the Docker image build with yq from the repo-root versions.yaml instead of Dockerfile ARG defaults. Drop the redundant workflow that only enforced parity between those two sources. Signed-off-by: Fabiano FidĂȘncio --- .../nydus-snapshotter-version-in-sync.yaml | 35 ------------------- tools/packaging/kata-deploy/Dockerfile | 10 +++--- versions.yaml | 2 -- 3 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/nydus-snapshotter-version-in-sync.yaml diff --git a/.github/workflows/nydus-snapshotter-version-in-sync.yaml b/.github/workflows/nydus-snapshotter-version-in-sync.yaml deleted file mode 100644 index 54f92ae9fe..0000000000 --- a/.github/workflows/nydus-snapshotter-version-in-sync.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: nydus-snapshotter-version-sync - -on: - pull_request: - types: - - opened - - edited - - reopened - - synchronize - -permissions: {} - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - nydus-snapshotter-version-check: - name: nydus-snapshotter-version-check - runs-on: ubuntu-22.04 - steps: - - name: Checkout code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: Ensure nydus-snapshotter-version is in sync inside our repo - run: | - dockerfile_version=$(grep "ARG NYDUS_SNAPSHOTTER_VERSION" tools/packaging/kata-deploy/Dockerfile | cut -f2 -d'=') - versions_version=$(yq ".externals.nydus-snapshotter.version | explode(.)" versions.yaml) - if [[ "${dockerfile_version}" != "${versions_version}" ]]; then - echo "nydus-snapshotter version must be the same in the following places: " - echo "- versions.yaml: ${versions_version}" - echo "- tools/packaging/kata-deploy/Dockerfile: ${dockerfile_version}" - exit 1 - fi diff --git a/tools/packaging/kata-deploy/Dockerfile b/tools/packaging/kata-deploy/Dockerfile index cdee7fd668..ae9d261fc5 100644 --- a/tools/packaging/kata-deploy/Dockerfile +++ b/tools/packaging/kata-deploy/Dockerfile @@ -7,17 +7,17 @@ FROM golang:1.24-alpine AS nydus-binary-downloader -# Keep the version here aligned with "nydus-snapshotter.version" -# in versions.yaml -ARG NYDUS_SNAPSHOTTER_VERSION=v0.15.13 -ARG NYDUS_SNAPSHOTTER_REPO=https://github.com/containerd/nydus-snapshotter +COPY versions.yaml /tmp/versions.yaml RUN \ + set -e && \ + apk add --no-cache curl yq-go && \ + NYDUS_SNAPSHOTTER_VERSION="$(yq eval -e '.externals.nydus-snapshotter.version | explode(.)' /tmp/versions.yaml)" && \ + NYDUS_SNAPSHOTTER_REPO="$(yq eval -e '.externals.nydus-snapshotter.url | explode(.)' /tmp/versions.yaml)" && \ mkdir -p /opt/nydus-snapshotter && \ ARCH="$(uname -m)" && \ if [ "${ARCH}" = "x86_64" ]; then ARCH=amd64 ; fi && \ if [ "${ARCH}" = "aarch64" ]; then ARCH=arm64; fi && \ - apk add --no-cache curl && \ curl -fOL --progress-bar "${NYDUS_SNAPSHOTTER_REPO}/releases/download/${NYDUS_SNAPSHOTTER_VERSION}/nydus-snapshotter-${NYDUS_SNAPSHOTTER_VERSION}-linux-${ARCH}.tar.gz" && \ tar xvzpf "nydus-snapshotter-${NYDUS_SNAPSHOTTER_VERSION}-linux-${ARCH}.tar.gz" -C /opt/nydus-snapshotter && \ rm "nydus-snapshotter-${NYDUS_SNAPSHOTTER_VERSION}-linux-${ARCH}.tar.gz" diff --git a/versions.yaml b/versions.yaml index 289190e5c5..eadb2b33ad 100644 --- a/versions.yaml +++ b/versions.yaml @@ -383,8 +383,6 @@ externals: url: "https://github.com/dragonflyoss/image-service" version: "v2.2.3" - # Keep the version here aligned with the NYDUS_SNAPSHOTTER_VERSION - # on tools/packaging/kata-deploy/Dockerfile nydus-snapshotter: description: "Snapshotter for Nydus image acceleration service" url: "https://github.com/containerd/nydus-snapshotter"