Skip to main content

run

run - Run a target on a selection of projects.

Description​

Run a target on a selection of projects and report the results. For each selected project, the target will be executed (if available) using its corresponding executor. By default, each execution might be skipped and its result get directly retrieved from cache. The run command will fail and return a non-zero status code if any of the targets that correspond to a selected project fail (or cannot be executed due to unfullfilled dependencies). It will also fail if an internal error occurs while executing any target (due to a configuration error, an IO error, or any other external cause).

Synopsis​

run [-t / --target <TARGET>] [--parallelism <PARALLELISM>] [-p / --projects <PROJECTS>] [-s / --selector <SELECTOR>] [-a / --all ] [--include <INCLUDE>...] [--exclude <EXCLUDE>...] [--tags <TAGS>] [--dry-run ] [--no-graph ] [--depth <DEPENDENCIES_DEPTH>] [<DOUBLE>]

Options​

  • [-t / --target <TARGET>] : The target name. Must be a valid target name. For example, build, or test. Selected projects that don't have any target matching this value will be ignored.
  • [--parallelism <PARALLELISM>] : The level of parallelism to use when running the target across multiple projects. You can pass a number to indicate the maximum number of jobs running at the same time. "All" will set the maximum number of executions to the number of logical cores on your system."Infinite" will run every jobs in parallel without any max limit."None" can be used to totally disable parallelism and run jobs sequentially.
  • [-p / --projects <PROJECTS>] : A list of project names. Will be parsed as a comma-separated list of project names (for e.g project1,project2,project3).
  • [-s / --selector <SELECTOR>] : A named selector to use when selecting projects. It must be declared at the workspace level.
  • [-a / --all ] : Select all projects in the workspace.
  • [--include <INCLUDE>...] : A pattern to use for including projects. You can pass this option multiple times if you want to use more than one inclusion pattern. Each pattern must be a valid regular expression. If you want to exclude some projects, you can use the --exclude option.
  • [--exclude <EXCLUDE>...] : A pattern to use for excluding projects that were selected using the --include option. You can pass this option multiple times if you want to use more than one exclusion pattern. Each pattern must a valid regular expression.
  • [--tags <TAGS>] : Tags to use when selecting projects. All projects that have at least one tag corresponding to one of the provided tags will be selected. You can pass multiple tags delimited by commas (for example, tag1,tag2,tag3).
  • [--dry-run ] : Skip execution of all targets. This can be used for debugging purpose, for example if you simply want to checkout the execution graph.
  • [--no-graph ] : Disables the display of a tree-style execution graph after all targets have been executed.
  • [--depth <DEPENDENCIES_DEPTH>] : Set a maximum depth of dependencies when executing targets. By default, every target dependencies are resolved resursively, no matter how deep. When providing zero, then no dependencies will be resolved for each target.

Arguments​

  • [<DOUBLE>] : An execution double consisting of an optional project name and a target name (in that specific order). Parts of the execution double must be separated with a colon. For e.g : build, or app:build. Using an execution double only allows to execute the target on a single project. Only the target name is mandatory, if the project name is not provided, then the default project selector will be used.

Subcommands​

No subcommands for this command.