Upstream checksums.txt has listed .sbom.json sidecars alongside the tarballs since v2.1.0; the unanchored grep matched both lines and sha256sum -c failed on the never-downloaded sbom file, breaking every scheduled build (runs 237, 243).
This commit is contained in:
1 parent
6e969b9b2d
commit
b7af2b5ed1
1 file changed
+4
-2
+4
-2
@@ -37,7 +37,9 @@ WORKDIR /tmp
|
|||||||
|
|
||||||
# Fetch the release checksums file and the linux/${TARGETARCH} tarball, then
|
# Fetch the release checksums file and the linux/${TARGETARCH} tarball, then
|
||||||
# verify the tarball's sha256 against the checksums file. Fails the build on
|
# verify the tarball's sha256 against the checksums file. Fails the build on
|
||||||
# any mismatch (checksums.txt entries: "<sha256> mcp-grafana_Linux_<arch>.tar.gz").
|
# any mismatch. The grep is end-anchored: upstream checksums.txt also lists
|
||||||
|
# .sbom.json sidecar entries for the same tarball names, which must stay out
|
||||||
|
# of the sha256sum input (only the downloaded tarball is verified).
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
SHORT="${MCP_GRAFANA_VERSION#v}"; \
|
SHORT="${MCP_GRAFANA_VERSION#v}"; \
|
||||||
case "$TARGETARCH" in \
|
case "$TARGETARCH" in \
|
||||||
@@ -47,7 +49,7 @@ RUN set -eux; \
|
|||||||
esac; \
|
esac; \
|
||||||
curl -fsSL "https://github.com/grafana/mcp-grafana/releases/download/${MCP_GRAFANA_VERSION}/mcp-grafana_${SHORT}_checksums.txt" -o checksums.txt; \
|
curl -fsSL "https://github.com/grafana/mcp-grafana/releases/download/${MCP_GRAFANA_VERSION}/mcp-grafana_${SHORT}_checksums.txt" -o checksums.txt; \
|
||||||
curl -fsSL "https://github.com/grafana/mcp-grafana/releases/download/${MCP_GRAFANA_VERSION}/mcp-grafana_${ASSET}.tar.gz" -o "mcp-grafana_${ASSET}.tar.gz"; \
|
curl -fsSL "https://github.com/grafana/mcp-grafana/releases/download/${MCP_GRAFANA_VERSION}/mcp-grafana_${ASSET}.tar.gz" -o "mcp-grafana_${ASSET}.tar.gz"; \
|
||||||
grep "mcp-grafana_${ASSET}.tar.gz" checksums.txt | sha256sum -c -; \
|
grep "mcp-grafana_${ASSET}\.tar\.gz$" checksums.txt | sha256sum -c -; \
|
||||||
tar -xzf "mcp-grafana_${ASSET}.tar.gz" mcp-grafana; \
|
tar -xzf "mcp-grafana_${ASSET}.tar.gz" mcp-grafana; \
|
||||||
chmod +x mcp-grafana
|
chmod +x mcp-grafana
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user