I am running a groovy script for my job on Jenkins and the xvfb call is
$ Xvfb :0 -screen 0 1024x768x24
This however fails claiming that an X server is already running. However if I run the command Xvfb -screen 0 1024x768x24 :99 (I've declared 99 as DISPLAY on the machine) it's successful.
How can I get the pipeline to add this argument? I am currently using a wrap class like wrap([$class: 'Xvfb']) in groovy so I'm assuming I'd add some arguments here, I am just not sure which ones.
update: So I've tried wrap([$class: 'Xvfb', additionalOptions: ':99']) but on jenkins it still shows it running as Xvfb :0 -screen 0 1024x768x24. I would change the Xvfb settings on jenkins but this is a test job and not a build one so I need to change this from the script itself.