Skip to content

ci(rock): fix goss download for goss >= v0.4.10 asset layout - #497

Closed
deusebio wants to merge 1 commit into
canonical:v1from
deusebio:wip-fix-goss-download-v0410
Closed

deusebio wants to merge 1 commit into
canonical:v1from
deusebio:wip-fix-goss-download-v0410

Conversation

@deusebio

@deusebio deusebio commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Problem

rock-pull-request.yaml installs goss via:

goss_base_url="https://github.com/goss-org/goss/releases/latest/download"
curl -L ${goss_base_url}/goss-linux-$(dpkg --print-architecture) -o /usr/local/bin/goss

goss latest is now v0.4.10, which removed the raw goss-linux-<arch> assets and now ships per-arch tarballs (e.g. goss_0.4.10_linux_x86_64.tar.gz). So releases/latest/download/goss-linux-amd64 returns 404, curl -L writes GitHub's "Not Found" page into /usr/local/bin/goss, and kgoss then copies that text file into the test pod. Running it fails with:

/tmp/goss/goss: 1: Not: not found
command terminated with exit code 127
[ERROR]: goss_wait.yaml never passed

This breaks the Tests job for every rock repo consuming this reusable workflow at @v1.

Fix

Pin goss to v0.4.10, download the per-arch tarball, and extract the goss binary, mapping dpkg arch to goss's naming (amd64x86_64, arm64arm64). kgoss is still a standalone asset, so its download is pinned to the same release.

goss_version="v0.4.10"
goss_base_url="https://github.com/goss-org/goss/releases/download/${goss_version}"
case "$(dpkg --print-architecture)" in
  amd64) goss_arch="x86_64" ;;
  arm64) goss_arch="arm64" ;;
  *) echo "unsupported architecture: $(dpkg --print-architecture)" >&2; exit 1 ;;
esac
curl -sSfL "${goss_base_url}/goss_${goss_version#v}_linux_${goss_arch}.tar.gz" | tar -xz -C /usr/local/bin goss
chmod +rx /usr/local/bin/goss
curl -sSfL "${goss_base_url}/kgoss" -o /usr/local/bin/kgoss
chmod +rx /usr/local/bin/kgoss

Verified the pinned URLs return 200 for both amd64 (x86_64) and arm64, and that a full goss suite runs correctly with the extracted v0.4.10 binary.

Related

goss v0.4.10 removed the raw goss-linux-<arch> release assets and now
ships per-arch tarballs (goss_<ver>_linux_<arch>.tar.gz). The pinned
'releases/latest/download/goss-linux-<arch>' URL therefore 404s, so curl
saved GitHub's 'Not Found' page as the goss binary and kgoss failed in
the test pod with 'goss: 1: Not: not found' (exit 127).

Pin goss to v0.4.10, download the per-arch tarball and extract the goss
binary, mapping dpkg arch (amd64->x86_64, arm64->arm64). Also pin the
kgoss download to the same release.
@lucabello

Copy link
Copy Markdown
Contributor

Sorry, didn't see this PR :)

Already implemented for v1 at 30382d7

Closing!

@lucabello lucabello closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants