I'm trying to automate tests using Jenkins. The principle of operation is as follows: There is a main machine (ubuntu 22) on which tests (pyTest) are stored and virtual machines (Ubuntu 18 and 20) are created, and jenkins is connected to the main machine.
The problem is the following, I am trying to run Selenium Server from Jenkins on a virtual machine by running the command:
sh '''ssh user@ip java -jar ~/selenium_driver/selenium-server-4.3.0.jar standalone -p 1234 > logs.log 2>&1'''
Although I got rid of the data output to the console, but the step in jenkins still "freezes" waiting for the command to complete and does not proceed to the next step.
How can this problem be solved? To perform the next step, after executing the selenium server startup command. Maybe you can move on to the next step without waiting for the previous one to be completed. I use PipeLine
Decided so:
After 20 seconds, the step is completed, while selenium remains working in the background