-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins: 1.596.3
Amazon EC2 plugin: 1.28
Amazon Linux
I'm utilizing the EC2 plugin to spin up Jenkins worker slaves on-demand. During the start-up of each worker, I want to download and start a selenium server.
After downloading the selenium server jar via curl, I've tried starting selenium via the Init Script.
Both:
screen -d -m -L -S selenium java -jar /tmp/selenium-server-standalone.jar
And:
nohup java -jar /tmp/selenium-server-standalone.jar &
Fail to start selenium. I've done a little digging, and in each case those commands exit with a status of 0, but it seems like nothing happens.
As a workaround, I'm using a cronjob to ensure selenium is running via screen. It is pretty hacky. I'd love to start a background process via the Init Script.
EDIT: I've added a screenshot of the work config, as well as full text of the Init Script.
The init script is run only on the the first startup of the instance to initialize it. There is nothing in the ec2 plugin the supported initialization of an existing instance when it is started.