Skip to content

Commit

Permalink
fix: use new ARM crossbuild docker images (#25987)
Browse files Browse the repository at this point in the history
* fix: use new ARM crossbuild docker images

* fix: enable ARMv7 package

* fix: use base-arm-debian9 only on ARM64 hosts

* chore: re-disable amrv7

* fix: linting issue
  • Loading branch information
kuisathaverat authored Jun 3, 2021
1 parent 2d04bf7 commit 7426f67
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
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
15 changes: 11 additions & 4 deletions dev-tools/mage/crossbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit 7426f67

Please sign in to comment.