Skip to content

Commit

Permalink
fix(apache#5292): Simplify run cmd for archs other than amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiesler committed Apr 23, 2024
1 parent 57149cf commit 5cc53ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/builder/jib.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"

v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
Expand Down Expand Up @@ -114,6 +115,8 @@ func (t *jibTask) Do(ctx context.Context) v1.BuildStatus {
if t.task.Configuration.ImagePlatforms != nil {
platforms := strings.Join(t.task.Configuration.ImagePlatforms, ",")
mavenArgs = append(mavenArgs, jib.JibMavenFromPlatforms+platforms)
} else if runtime.GOARCH == "arm64" {
mavenArgs = append(mavenArgs, jib.JibMavenFromPlatforms+"linux/arm64")
}
if t.task.Registry.Insecure {
mavenArgs = append(mavenArgs, jib.JibMavenInsecureRegistries+"true")
Expand Down

0 comments on commit 5cc53ee

Please sign in to comment.