Builder Command

Use the builder command to build a Flogo Enterprise app from the command line.

Binary Types

You can build either one of these binary types from the command line:

  • Flogo app binary - contains the Flogo runtime + only those connectors used by that app.
  • Flogo engine binary - contains the Flogo runtime + all the connectors that are present in your Flogo Enterprise installation. The advantage of creating such a binary is that it can run any Flogo app that uses one or more connectors included as a part of the binary. This helps reduce the number of binaries per app.
    Note: You cannot build a Docker image for a Flogo engine binary using the CLI.

To view arguments and options for the build command, open a terminal, navigate to the <FLOGO_HOME> \bin folder, and run the following:

On Windows: builder-windows_amd64.exe help build

On Macintosh: builder-darwin_amd64 help build

On Linux: builder-linux_amd64 help build

Command Name and Syntax Description

build

SYNTAX:

builder- <platform> build [options]

Build the Flogo app binary or the Flogo engine artifact.
Options Description
-docker

(or)

-d

Build a Docker image of the Flogo app. A Docker image is created as:

flogo/<AppName>:<Tag>

Note: Note: On some older versions of Linux, if you use a Cisco AnyConnect VPN client, you might see an error in the Flogo Enterprise command line interface when generating a Docker image. Either disconnect from the VPN and restart Docker or use another VPN client such as OpenConnect.
-f Path to the JSON file for the Flogo app. Use this option only if you want to build a Flogo app binary.
-n <name>:<tag>

(or)

-name <name>:<tag>

Where: 

  • <name> is the name of the binary file to be generated. If a name is not provided, a binary is generated in the following format:

    <APPNAME>-<OS_NAME>_<OS_ARCH>

  • <tag> is the tag to be used if a Docker image is to be created. If a tag is not provided, the default is the latest.
-o Path to the output folder where binary is created. By default, the binary is created in the current folder.
-p Build binary for specific platform. Value must be specified as <OS_NAME>/<OS_ARCHITECTURE>. For example, linux/386 or linux/amd64. Refer to https://golang.org/doc/install/source#environment for all supported operating systems and architecture combinations.
-v Enable verbose progress and debug output.

Examples for creating the Flogo app binary

  • builder_darwin_amd64 build -f MyAPP.json

    This command creates a binary of MyAPP.json on the Macintosh platform.

  • builder_darwin_amd64 build -p linux/amd64 -f /home/tibco/MyApp/MyAPP.json -n Routing -o /home/tibco/MyApp/binary

    This command creates a binary called Routing in the /home/tibco/MyApp/binary folder for MyAPP.json. This binary can be run on the linux/amd64 platform.

  • builder_linux_amd64 build -f MyAPP.json -docker -tag=V1

    This command builds a Docker image of MyApp.json on Linux/amd64. The image is created as flogo/MyApp:V1.

Example for creating the Flogo engine binary

builder_darwin_amd64 build -o <path-to-flogoengine_binary>

If you do not provide any options the engine binary is built with the default name in the format engine-<platform>-<architecture>

To run any compatible app using the <flogoengine_binary_name>, run the following command:

./<flogoengine_binary_name> --app <app-name.json>

Alternatively, you can create the Flogo engine binary by following these steps:

  1. Rename <app-name.json> to flogo.json
  2. Place the flogo.json file in the same directory as <flogoengine_binary_name>
  3. Run: ./<flogoengine_binary_name>