@@ -80,10 +80,10 @@ pipeline {
8080 choice(name: 'process', choices: [''], description: 'Target process')
8181 choice(name: 'browser', choices: ['chrome', 'firefox', 'edge'], description: 'Target web browser')
8282 booleanParam(name: 'dry_run', defaultValue: false, description: 'Validate without executing')
83- booleanParam(name: 'parallel', defaultValue: false, description: 'Enable parallel execution')
83+ booleanParam(name: 'parallel', defaultValue: false, description: 'Enable parallel batch execution across cores')
8484 choice(name: 'threads', choices: ['auto', '2', '4', '8', '12', '16', '24', '32', '48', '64'], description: 'Number of parallel threads (auto = one thread per available core)')
8585 booleanParam(name: 'headless', defaultValue: false, description: 'Enable headless browser')
86- booleanParam(name: 'video', defaultValue: true , description: 'Enable video capture (not available with parallel or headless)')
86+ booleanParam(name: 'video', defaultValue: false , description: 'Enable video recording')
8787 }
8888 environment {
8989 GWEN_ENV = "${params.env}"
@@ -99,37 +99,43 @@ pipeline {
9999 stage("Prepare") {
100100 steps {
101101 script {
102+ // Clean up docker
103+ sh 'docker rm -f $(docker ps -a -q) || true'
104+ sh 'docker volume rm gwen_assets gwen_downloads || true'
102105 // Prepare output dir
103- sh 'mkdir -p gwen/output'
104106 sh 'rm -rf gwen/output/**'
107+ sh 'mkdir -p gwen/output'
105108 }
106109 }
107110 }
108111 stage("Gwen") {
109112 steps {
110- try {
111- // Spin up environment and execute Gwen in docker
112- sh "docker-compose -p ${env.BUILD_TAG.toLowerCase()} -f gwen/docker-compose.yml run gwen"
113- if (!fileExists('gwen/output/reports/html/index.html')) {
114- error 'Evaluation report not generated'
115- }
116- } catch(err) {
117- if (fileExists('gwen/output/reports/html/index.html')) {
118- unstable 'Gwen completed with failure(s) reported.'
119- } else {
120- error "Gwen failed to execute or complete: ${err.getMessage()}"
113+ script {
114+ try {
115+ // Spin up environment and execute Gwen in docker
116+ sh "docker-compose -f gwen/docker-compose.yml -p ${env.BUILD_TAG.toLowerCase()} run gwen"
117+ if (!fileExists('gwen/output/reports/html/index.html')) {
118+ error 'Evaluation report not generated'
119+ }
120+ } catch(err) {
121+ if (fileExists('gwen/output/reports/html/index.html')) {
122+ unstable 'Gwen completed with failure(s) reported.'
123+ } else {
124+ error "Gwen failed to execute or complete: ${err.getMessage()}"
125+ }
121126 }
122127 }
123128 }
124129 post {
125130 always {
126- sh "docker-compose -p ${env.BUILD_TAG.toLowerCase()} -f gwen/docker-compose.yml down || true"
127- archiveArtifacts artifacts: 'gwen/output/reports/**'
131+ sh "docker-compose -f gwen/docker-compose.yml -p ${env.BUILD_TAG.toLowerCase()} down || true"
132+ sh 'docker rm -f $(docker ps -a -q) || true'
133+ sh 'docker volume rm gwen_assets gwen_downloads || true'
128134 publishHTML(target: [
129135 allowMissing : true,
130136 alwaysLinkToLastBuild : false,
131137 keepAll : true,
132- reportDir : " gwen/output/reports/html" ,
138+ reportDir : ' gwen/output/reports/html' ,
133139 reportFiles : 'index.html',
134140 reportName : "Gwen-Report"
135141 ])
0 commit comments