Fleet 1.0 Help

Run configurations

In order to run code, tests, and tasks, Fleet uses run configurations.

Run configuration is a set of parameters that define how exactly you program or task has to run. It contains the entire context that is required for launch, including commands, paths to executables, environment variables, virtual machine options, arguments, and so on.

Create a run configuration

  1. Press ⌘R. In the popup that appears, select Create Run Configurations.

    Create run json 0

    .fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.

  2. Define new configurations as objects in the configurations array. For example, the following configuration runs the gradle build command.

    { "configurations": [ { "name": "build my app", "type": "gradle", "tasks": [ "build" ] } ] }

    For information on available run configuration parameters, refer to the Reference section.

Launch a run configuration

  • Press ⌘R. Select the configuration that you are going to run or debug.

    Select run configuration

Reference

This chapter provides descriptions and examples for run configuration properties. Use it to find out how to correctly set up a particular run configuration.

Key

Possible values

name

(required)

The name that identifies the run configuration.

type

(required)

The type of the run configuration, which defines the startup logic. The rest of the parameters depend on the type of the run configuration.

  • cargo – a cargo task

  • gradle – a gradle task

  • maven – a maven goal

  • command – a terminal command

  • go – a Go program

  • python – a Python script

environment

An object that specifies custom environment variables. To define an environment variable, add a property, where the key is the variable name and the value is the value of the variable, for example:

"environment": { "TEMP_DIR": "/home/user/temp", "GENERATE_RANDOM_PASSWORD": "true" }

args

An array with program arguments.

For example, to run

curl -I https://www.example.com

the arguments have to be specified as:

"args": ["-I", "https://www.example.com"]

tasks

(required for maven and gradle)

An array with Gradle tasks or Maven phases/goal to execute. For example:

"tasks": ["clean"]

pythonExecutablePath

(required for python)

The path to the Python interpreter, for example:

"pythonExecutablePath": "/opt/python/bin/"

scriptPath

(required for python)

The path to the Python script that you are going to execute, for example:

"scriptPath": "/home/me.user/hello-fleet.py"

parameters

(required for python)

An array with the parameters to be passed to the program.

"parameters": ["Hello", "Fleet"]

If you aren't passing any parameters, specify an empty array here:

"parameters": []

cargoArgs

(available in cargo)

An array with arguments passed to cargo. For example:

"cargoArgs": ["test","--package","simple-server","--lib"]

cargoExtraArgs

(available in cargo)

An array with extra arguments passed to cargo. For example:

"cargoExtraArgs": ["--release"]

executableArgs

(available in cargo)

An array with arguments passed to the binary. For example:

"executableArgs": ["test_write_response_no_headers","--exact","--nocapture"]

goExecPath

(required for go)

The path to Go executable, for example:

"goExecPath": "/usr/local/go/bin/go"

params

(required for go)

An array with the parameters for launching Go. For example, to run

/path/to/go build -o compileOutput package

the parameters have to be specified as:

"params": ['build', '-o', 'compileOutput', 'package']
Last modified: 07 June 2022