flogo icon indicating copy to clipboard operation
flogo copied to clipboard

Support cross-building for shims

Open fcastill opened this issue 5 years ago • 0 comments

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.

fcastill avatar Jun 25 '20 22:06 fcastill