Hello.

tl;dr: Please have a look at 
https://github.com/croesch/xvnc-plugin/commit/55168876423efc3198993f692192a6b6bd56d55e
 and tell me if there's a better way to solve the problem.

We ran into a problem that seems to affect a couple of jenkins users that run 
xvnc and sonar. One of the earliest threads I found was this: 
http://sonarqube.15.x6.nabble.com/Sonar-plugin-fails-in-Jenkins-job-because-xvnc-is-terminated-too-early-tp4554438.html

In short, the problem is that sonar runs its analysis and therefore the tests 
AFTER the Xvnc plugin terminated the vncserver.

We discussed some solutions, namley

- run sonar as build step
- allow xvnc-plugin to be terminated after sonar action
- restart xvnc-plugin for sonar analysis
- somehow increase the opportunities by patching jenkins itself and adapting 
the two plugins afterwards
- some other dirty solutions

We decided to investigate in 'allow xvnc-plugin to be terminated after sonar 
action'. And we found a solution that is great in terms of solving our problem: 
We add an option that allows killing Xvnc as post build action. The xvnc-plugin 
creates an post build action (if the option is true) which kills the xvnc and 
appends it to the list of post build actions. The action also removes itself 
from the list after being executed to avoid persistency of our pseudo action.

The commit has been pushed here: 
https://github.com/croesch/xvnc-plugin/commit/55168876423efc3198993f692192a6b6bd56d55e

I know it does neither fulfil the code style, nor the test requirements, nor 
the commit message. But as it's a proof of concept, we wanted to publish the 
solution and have it discussed first before making it ready for being merged.

So I have a couple of questions

- Is this solution more or less stable as far as you can see?
- Could the problem be solved in a better way?
- If this is the best way, what needs to be done before filing a PR? Extend the 
tests of course, but shall I open an issue? 


Thanks in advance!
-- Christian

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/FA952712B6AC8E4391FC1682BA9EBA8051A2DEF8%40icsrv10.icongmbh.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to