Run multiple targets
DataGrip provides several ways to run multiple things at once, for example, run scripts that create a schema, then run a statement on that schema, and finally run some tests. The first step in any case would be to create run configurations for each of the tasks or processes that need to be launched. Once all necessary configurations are in place, you have several options of launching them:
Launch multiple configurations in parallel using a compound run configuration
Launch multiple configurations in sequence using the Before Launch tasks
When multiple configurations are launched at once, each will be available in a separate tab in the Run or Debug tool window.
Parallel launch with a compound run/debug configuration
A Compound run configuration lets you launch several run configurations simultaneously.
Create a compound run configuration
Create a run/debug configuration for each app and/or process that should be launched in your session.
From the main menu, select
. Alternatively, press Alt+Shift+F10, then 0.In the Run/Debug Configurations dialog, click or press Alt+Insert, then select Compound.
Specify the run/debug configuration name in the Name field. This name will be shown in the list of the available run/debug configurations.
Select Store as project file to make this run configuration available to other team members.
To include a new run configuration into the compound configuration , click Add and select the desired one from the list.
Apply changes and close the dialog.
Once you set up the compound configuration, you can launch it with or without debugging.
Sequential launch with the Before Launch task
You can use run configuration's Before Launch tasks for many different things, and one of them is to launch other run configurations.
Configure 'Before Launch' tasks
Create a run/debug configuration for each app and/or process that should be launched in your session.
From the main menu, select
. Alternatively, press Alt+Shift+F10, then 0.In the Run/Debug Configuration dialog, select the configuration that should be launched last.
Expand the Before Launch section in the configuration settings.
Click Add, then Run Another Configuration, and then select the desired configuration.
Make sure that all necessary configurations are added. Use the Up Alt+ArrowUp and Down Alt+ArrowDown to arrange the launch order (configurations at the top will be launched first).
Apply the changes and close the dialog.
Once you set up Before Launch tasks in the configuration that should be started last, you can launch it with or without debugging.