cli icon indicating copy to clipboard operation
cli copied to clipboard

replacements in .goreleaser.yml preventing CI automation

Open T0MASD opened this issue 3 years ago • 4 comments

Hi, I'm raising this to review https://github.com/tektoncd/cli/blame/main/.goreleaser.yml#L21 the replacements:

    darwin: Darwin
    linux: Linux
    windows: Windows
    386: i386
    amd64: x86_64

This is preventing url generation on CI builds like I have attempted here: https://github.com/tektoncd/plumbing/pull/1223/files#diff-c2315bb01874a1f74a8b6e38a5612b842595974e893145a06365f4db4826f574R20

GOARCH=$(go env GOARCH) \ GOOS=$(go env GOOS) \ && wget -O- https://github.com/tektoncd/cli/releases/download/v${TKN_VERSION}/tkn_${TKN_VERSION}_${GOOS}_${GOARCH}.tar.gz | tar zxf - -C /usr/local/bin

Is there a reason to make those replacements? What are the options to reliably generate multi arch (arm, x86 etc.) downloads for CI builds?

T0MASD avatar Oct 07 '22 17:10 T0MASD

cc @chmouel

vdemeester avatar Oct 10 '22 08:10 vdemeester

@vdemeester i think you are the one who added this first from a copy pasta i guess 🙃

I don't think there is a reason but whatever we do we may be careful changing binary names for distro/people's scripts out there grabbing new versions via regexp on release page...

chmouel avatar Oct 10 '22 12:10 chmouel

@T0MASD maybe grab the binary via the api instead ?

chmouel avatar Oct 10 '22 12:10 chmouel

Thanks for your reply @chmouel, it makes sense to keep the existing format where binaries are named following convention in replacements. There's a one issue though, replacements are missing for arm architecture causing the lookup method (uname -m) that is used on x86 arch to fail. please see https://github.com/tektoncd/plumbing/blob/main/tekton/images/tkn/Dockerfile#L19 I will propose a change in MR for review

T0MASD avatar Oct 10 '22 18:10 T0MASD