diff --git a/.ci/packer_cache.sh b/.ci/packer_cache.sh index e4248118fae..1627343c612 100755 --- a/.ci/packer_cache.sh +++ b/.ci/packer_cache.sh @@ -45,6 +45,8 @@ function dockerPullImages() { docker.elastic.co/kibana/kibana:${SNAPSHOT} docker.elastic.co/logstash/logstash:${SNAPSHOT} docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-arm + docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-armhf + docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-armel docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-base-arm-debian9 docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-darwin docker.elastic.co/beats-dev/golang-crossbuild:${GO_VERSION}-main diff --git a/dev-tools/mage/crossbuild.go b/dev-tools/mage/crossbuild.go index a44c326f82f..10d73c3876c 100644 --- a/dev-tools/mage/crossbuild.go +++ b/dev-tools/mage/crossbuild.go @@ -197,15 +197,22 @@ func crossBuildImage(platform string) (string, error) { tagSuffix := "main" switch { - case strings.HasPrefix(platform, "darwin"): + case platform == "darwin/amd64": tagSuffix = "darwin-debian10" - case strings.HasPrefix(platform, "linux/armv7"): - tagSuffix = "armhf" - case strings.HasPrefix(platform, "linux/arm"): + case platform == "darwin/arm64": + tagSuffix = "darwin-arm64-debian10" + case platform == "linux/arm64": tagSuffix = "arm" + // when it runs on a ARM64 host/worker. if runtime.GOARCH == "arm64" { tagSuffix = "base-arm-debian9" } + case platform == "linux/armv5": + tagSuffix = "armel" + case platform == "linux/armv6": + tagSuffix = "armel" + case platform == "linux/armv7": + tagSuffix = "armhf" case strings.HasPrefix(platform, "linux/mips"): tagSuffix = "mips" case strings.HasPrefix(platform, "linux/ppc"):