Skip to content

Commit 25fc608

Browse files
vdemeestertekton-robot
authored andcommitted
entrypoint: handle linux in pkgs/platforms
Without this, we can errors such as the following ERROR failed to get CPU variant os=linux error="getCPUVariant for OS linux: not implemented" could not find command for platform "linux/arm64" The main reason for this is because we are missing the variant when getting the platform, but the oci images for arm64 have it, and thus `TEKTON_PLATFORM_COMMANDS` as well. It creates a mismatch, and the entrypoint cannot find the command it looks for. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
1 parent 8f1210c commit 25fc608

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/platforms/platforms.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const (
3636
Windows = "windows"
3737
Darwin = "darwin"
3838
FreeBSD = "freebsd"
39+
Linux = "linux"
3940
)
4041

4142
// Platform describes the platform which the image in the manifest runs on.
@@ -121,7 +122,7 @@ func getCPUVariant() (string, error) {
121122
default:
122123
variant = Unknown
123124
}
124-
case FreeBSD:
125+
case Linux, FreeBSD:
125126
// FreeBSD supports ARMv6 and ARMv7 as well as ARMv4 and ARMv5 (though deprecated)
126127
// detecting those variants is currently unimplemented
127128
switch runtime.GOARCH {

0 commit comments

Comments
 (0)