Reputation: 164
I want my JBoss server to run in background, for that I am using nohup ./startPID.sh > /dev/null 2>&1& command. But when I pass same command in Jenkins, it doesn't work as expected. The console output in Jenkins says "command ran successfully" but in backend the JBoss server is still down.
Any inputs?
Regards
Manish Mehra
Upvotes: 1
Views: 1525
Reputation: 142
Use "at now" instead of "nohup"
In your job jenkins (execute shell) put :
set +e #so "at now" will run even if java -jar fails
#Run java app in background
echo "java -jar $(ls | grep *.jar | head -n 1)" | at now + 1 min
Upvotes: 1
Reputation: 9075
You could look at the JBoss management plugin
which spins up JBoss for you
This plugin allows to manage a JBoss Application Server during build procedure.
With the plugin we can start/stop JBoss AS. It's very useful if we need to run some integration tests against of the server. There is also operation allows verification if artifacts are deployable.
It looks to be quite an old plugin but has cuurent users
Upvotes: 0