Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use new ARM crossbuild docker images #25987

Merged
merged 7 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions dev-tools/mage/crossbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,22 @@ func crossBuildImage(platform string) (string, error) {
tagSuffix := "main"

switch {
case strings.HasPrefix(platform, "darwin"):
case strings.HasPrefix(platform, "darwin/amd64"):
tagSuffix = "darwin"
case strings.HasPrefix(platform, "linux/arm"):
case strings.HasPrefix(platform, "darwin/arm64"):
tagSuffix = "darwin-arm64"
case strings.HasPrefix(platform, "linux/arm64"):
tagSuffix = "arm"
// when it runs on a ARM64 host/worker.
if runtime.GOARCH == "arm64" {
tagSuffix = "base-arm-debian9"
}
case strings.HasPrefix(platform, "linux/armv5"):
tagSuffix = "armel"
case strings.HasPrefix(platform, "linux/armv6"):
tagSuffix = "armel"
case strings.HasPrefix(platform, "linux/armv7"):
tagSuffix = "armhf"
case strings.HasPrefix(platform, "linux/mips"):
tagSuffix = "mips"
case strings.HasPrefix(platform, "linux/ppc"):
Expand Down