Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
Docker container with ubuntu 14.04
apt-get install -y xvfb xfonts-100dpi xfonts-75dpi xfonts-cyrillic xorg dbus-x11
apt-get install -y freerdp-x11
Description
My Jenkinsfile use Xvfb:
... parallel( intTests: { sh "mvn -B install -P intTests" }, funcTests: { wrap([$class: 'Xvfb']) { sh "mvn -B install -PfuncTests" } }, failFast: false ) ...
In test I try to run xfreerdp:
xf_pre_connect: failed to open display: :0 Please check that the $DISPLAY environment variable is properly set. freerdp_pre_connect failed
If I manually export DISPLAY variable all work perfect.
May be there is a way to configure Xvfb in Jenkinsfile?
I believe I've tracked down the cause of the problem, in fact it was two issues that were causing this behavior: race condition between the test if Xvfb was running when started by docker exec and use of frame buffer directory for Xvfb that was not mounted as a volume in the started docker container. Now the timeout value defaults to 1 second, that should be enough to alleviate the race condition and frame buffer directory is created within the workspace of the build that should be present in the docker container.
I've released a beta version of the Xvfb plugin to the experimental update center could you install the version 1.1.4-beta1 from there and test if this fixed your problem?