Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins foreground task

I have two Jenkins machines. Both run windows batch commands

When I start programs on one, they start in the background (Staging box). When I start programs on the other, they start in the foreground, and you can see the window and watch the program as it's running (Production box).

I'm trying to test a program which only works in the foreground (it's a Cocos game executable and probably needs to be in the foreground to run properly).

I need to know what Jenkins-settings to change so that my staging-Jenkins box behaves the same as my Production-Jenkins box.

I have already tried: The jenkins windows service is running as the currently logged in user.

Most other questions talk about forcing it to the background, which is the opposite of my problem.

like image 658
Paul Gilmore Avatar asked Nov 27 '25 13:11

Paul Gilmore


1 Answers

Finally figured it out.

If you are running Jenkins as a Windows service, then the service is running in the background, and thus the programs started by Jenkins will also be run in the background.

If you run Jenkins in the foreground (Ie, typing "java -jar jenkins.war" in a console window), then programs started by Jenkins will also be in the foreground (since the foreground console window is the Jenkins process).

Jenkins-Slaves run as a service, but they run with a foreground window, so they show up in the foreground of the slave machine.

like image 92
Paul Gilmore Avatar answered Nov 30 '25 05:11

Paul Gilmore



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!