rancher / support-bundle-kit

A toolkit to generate and analyze the support bundles for Kubernetes and Kubernetes-native applications
Apache License 2.0
17 stars 28 forks source link

ci: fix arm64 #107

Closed Yu-Jack closed 5 months ago

Yu-Jack commented 5 months ago

Related Issue: https://github.com/harvester/harvester/issues/5327

In my mac:

# This is built from gtihub action runner

$ docker run -d jk82421/support-bundle-kit:pull-4 sleep 3600
311a36435cf889f0d33db0b8270e8faaf87beddb2417bd8ef83f2a876670d228

$ docker exec 311a36435cf8 /usr/bin/support-bundle-kit version
202f37a (202f37a)

$ docker cp 311a36435cf889f0d33db0b8270e8faaf87beddb2417bd8ef83f2a876670d228:/usr/bin/support-bundle-kit /tmp
Successfully copied 128MB to /tmp

$ file /tmp/support-bundle-kit
/tmp/support-bundle-kit: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=6ZEPFoNEv2DISxl2ERsU/TkiuAlNxM_jW_R340fl0/vh3jqz2fndUQy1JO7M3X/8b7mpsU2ia7AD2rGE0lr, stripped

# in my m1 mac
$ /tmp/support-bundle-kit
zsh: exec format error: /tmp/support-bundle-kit

$ orb push /tmp/support-bundle-kit

#  in ubuntu arm64
$ orb -m ubuntu-arm64
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

root@ubuntu-arm64:/Users/home$ cd
root@ubuntu-arm64:~$ ./support-bundle-kit version
202f37a (202f37a)
root@ubuntu-arm64:~$

In my linux laptop:

$docker run -d jk82421/support-bundle-kit:pull-4 sleep 3600
df60744044cc6a40503b04ce40f9fad7708a70101b88e6ff30b6da3e142cb851

$ docker exec df60744044cc6a40503b04ce40f9fad7708a70101b88e6ff30b6da3e142cb851 /usr/bin/support-bundle-kit version
202f37a (202f37a)

$ docker cp df60744044cc6a40503b04ce40f9fad7708a70101b88e6ff30b6da3e142cb851:/usr/bin/support-bundle-kit /tmp
Successfully copied 135MB to /tmp

$ file /tmp/support-bundle-kit
/tmp/support-bundle-kit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=YMglQDLDtYNXew7zpsyD/i3Ckn_KizVFBzxxDzBN6/xl-eWAiPfNlyOUG8mMZ2/1xfcwZIsSgI4BInBDG_j, stripped
Yu-Jack commented 5 months ago

@FrankYang0529 you could check this PR, after @ibrokethecloud and I tested, we could just use make ci without using image: rancher/dapper:v0.5.8.