Skip to content

Support cross-building for shims #537

@fcastill

Description

@fcastill

Current behavior:

When I want to shim build a flogo app another platform I run a command like this:

GOOS=darwin GOENV=amd64 flogo build -o -e --shim my_trigger_id

When I run this in a Linux environment the CLI builds a build.go for Darwin and then when it runs the flogo build it tries to execute a Darwin bin, which fails because it is running in a Linux environment.

Specifically, I'm trying to enable shim cross-builds for the Flogo Web UI which runs the CLI in a Linux docker container and allows for compiling to different GOOS/GOENV combinations.

Expected behavior:

The CLI should detect the environment it should compile against and use GOOS/GOENV for the final result of the process. Alternatively, the target OS and ENV can be specified as parameters for the flogo build command or as flogo specific environment variables.

What is the motivation / use case for changing the behavior?

We need a way to cross-compile shimmed apps for other platforms and that way we can also enable proper shim compilation in the Web UI.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions