I'm trying to create a compound/multirun run configuration in intellij where each configuration runs sequentially. I've tried with both compound and multirun, however it appears that neither allow configurations to be run one after the other (as in the second waits for the first to finish).
Is there any way to do this?
There are related requests for Compound configuration: https://youtrack.jetbrains.com/issue/IDEA-166035 and for Multirun plugin: https://github.com/rkhmelyuk/multirun/issues/63
This is possible by using the plain Before Launch settings of a Run Configuration. There you can specify one or more other Run Configurations. These will run sequentially before running the original Run Configuration.
Related
How do I run several buildsteps after each other in IntelliJ? I think I want a mini CI/CD build system inside the editor.
For example, the project I work on now is a Spring boot and javascript web site. I need to build it with maven with mvn clean package -Pdockerimage. This copies files for building the Docker image to target/dockerimgbuild.
Then I want to build the docker image using docker build -t scheduling-ui-dev . and after that run it with docker compose docker-compose up --build from src/main/resources/docker-compose.
I have built one run configuration for each of these steps but how do I run them after each other? I have found that you can have before launch but the system is clunky and complains if target/dockerimgbuild doesn't exists even before it have run the maven step which creates it. Latest problem I stumbled on was that a file prevented maven from removing target/dockerimgbuild and all run steps was automatically removed from the run configurations.
There is a run configuration called compound but that runs everything in parallell and you can not specify order which is a problem.
I wonder if it is feasible to start TeamCity in a container, do anyone have a clue about that (is teamcity easy to configure, how to make it launch a docker-compose container on my host machine etc)?
My solution right now is to have several terminals (if this gets more permanent I will replace it with a script) where I just press up and enter to execute the steps manually. Seems stupid as I guess maven itself can do all of this...but I don't know how or how much work it is.
There is a compound Run/Debug configuration: https://www.jetbrains.com/help/idea/run-debug-configuration-compound-run-configuration.html
Also, there is a multi-run plugin: https://plugins.jetbrains.com/plugin/7248-multirun
Using the "Run/Debug Configurations" tool in WebStorm, I would like to create one script that ends up running multiple npm scripts. For example, I would like to create a single script that will end up executing npm run script-one && npm run script-two.
Is this possible?
You can use Compound type of Run/Debug Configuration.
https://www.jetbrains.com/help/webstorm/creating-compound-run-debug-configuration.html
https://www.jetbrains.com/help/webstorm/run-debug-configuration-compound-run-configuration.html
For example, you may want to run the sequence of several test configurations, or run several configurations of different types (for example, JavaScript, HTML, etc). WebStorm provides you with the dedicated capability for that: a compound Run/Debug configuration. Compound configuration can include multiple configurations of the same or different type with the same or different specified targets.
When you run or debug your code using a compound configuration, you actually launch a sequence of configurations it includes in order they are listed.
Another possible idea: use "Before launch" section to run some other tasks before executing current one: https://www.jetbrains.com/help/webstorm/run-debug-configuration-npm.html#before-launch-options
I am trying to simplify the way we run cucumbers. We have a runner for each folder and we always change the runner in a run configuration that has some VM options set.
I can right click on a feature, select "Run feature :" but it doesn't run successfully without the parameters from the run configuration (one of them runs the tests with an in memory database for example)
Is there anyway I can add a default configuration so I can run them directly?
Run -> Edit Configurations
In the left-hand panel, there is a category called defaults. You can set the defaults to cucumber there. However, note that you might have to delete your previously existing configurations to get this to work with files you've already tried. They usually appear in a faded gray.
In addition, you could also add a runner class, which can run (a subset of) your tests from a testing framework. You can provide #CucumberOptions in this runner.
Similar to this question, I want to run multiple Run Configurations as one. However, instead of running them simultaneously (parallel), I want to run them after one another in a specific order.
I know I can select another Run Configuration to run before another, like answered here, but approach has one issue: it's not possible to have one generic/main/super Run Configuration that runs nothing else than the specified run configurations. I must to pick one project-specific configuration (e.g. a Python configuration in PyCharm, the JetBrains Python IDE similar to IntelliJ IDEA) to be able to choose Run Configurations to run serially before the main one. This is an issue, because if I ever want to change to or insert a different configuration where the main Python Run Configuration is, I need to remake the Run Configuration Order besides a new one. With a predefined serial list of Run Configurations to execute, this would be as simple as inserting another configuration in the list.
Is this possible and how do I achieve this?
Besides the Before launch functionality mentioned in the question, there is no such possibility in IntelliJ IDEA and other JetBrains IDEs to my knowledge. However, there exists plugins that add Run Configurations that initially do nothing (empty), which can be considered as a generic/main/super Run Configuration. In such a configuration the regular way of specifying other configurations to run sequentially before launch can be used to achieve the question's goal.
An example of a plugin that adds an initially empty Run Configuration is the Multirun plugin. Don't be confused by its name: it's meant to run multiple Run Configurations simultaneously with the option to start them sequentially, but it does not wait for earlier ones to finish before starting the later ones. Just add the default (empty) Multirun configuration and queue up other tasks to run sequentially through the Before launch section.
It's a pity JetBrains haven't added a serial/sequential execution configuration in their Compound Run Configuration, which basically achieves what the Multirun plugin achieves: simultaneous / parallel execution. With compound run configurations, the Run Configuration editor would become a really powerful but simple to program configurations for various wishes like Gradle achieves for more complex build configurations.
i was wondering, if i can configure a run configuration (like executing a ruby script on a deployment server) with a prompt for parameters on starting the config. Like it does for starting rake tasks from the 'Run Rake Task...' after selecting a task.
I couldn't find anything in the run/debug config view and with a google search.
I recently found out that this feature is in fact implemented, kind of.
On the Run/Debug Configurations page there is a checkbox at the bottom called "Show this page". If you check this, everytime you want to start the config, you get a somewhat smaller version of the config page, letting you edit for example arguments and stuff.
Serves me quite well and yes, it is not fully what i need, but it does the job.
It's not supported at the moment, related requests:
IDEA-152268 User prompted values in run configuration for "VM options" and "Program arguments"
IDEA-74031 Variables in command line parameters of run configuration