I'm trying to wrap stages by using:
wrap([$class: 'Xvfb', additionalOptions: '', assignedLabels: '', autoDisplayName: true, debug: true, displayNameOffset: 100, installationName: 'XVFB', parallelBuild: true]) {
If I have Jenkins file with below lines, how can I start the Xvfb first then start running the tests suite? In other words how to wrap the stages?
pipeline {
agent any
parameters{
choice(choices: 'chrome\nfirefox\nie' , description: 'choose browser name' , name: 'browser')
choice(choices: 'false\ntrue' , description: 'Not running on Selenium Grid?' , name: 'localRun')
}
stages {
stage('Install Parent Project') {
steps {
sh 'mvn -f /var/lib/jenkins/workspace/ clean install -DskipTests=true'
}
}
}
Thanks.