Skip to content

Commit e4bf8a9

Browse files
committed
Use BROWSER environment variable to select browser
1 parent 7d1904e commit e4bf8a9

File tree

1 file changed

+11
-10
lines changed
  • docs/tutorials/jenkins/parallel-robot-pipeline

1 file changed

+11
-10
lines changed

docs/tutorials/jenkins/parallel-robot-pipeline/Jenkinsfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,26 @@ pipeline {
1515
agent { docker {
1616
image 'ghcr.io/cicd-tutorials/robot-browser:latest'
1717
args '--entrypoint=""'
18-
reuseNode true
1918
} }
19+
environment {
20+
BROWSER = "chromium"
21+
}
2022
steps {
2123
sh "robot -d robot_output -l none -r none -o chromium.xml -N Chromium -v URL:${params.URL} --nostatusrc $d/suites/"
22-
// If reuseNode true was not used, we would have to stash the output XML.
23-
// stash includes: 'robot_output/**', name: 'Chromium'
24+
stash includes: 'robot_output/**', name: 'Chromium'
2425
}
2526
}
2627
stage('Firefox') {
2728
agent { docker {
2829
image 'ghcr.io/cicd-tutorials/robot-browser:latest'
2930
args '--entrypoint=""'
30-
reuseNode true
3131
} }
32+
environment {
33+
BROWSER = "firefox"
34+
}
3235
steps {
33-
sh "robot -d robot_output -l none -r none -o b.xml -N Firefox -v URL:${params.URL} --nostatusrc $d/suites/"
34-
// If reuseNode true was not used, we would have to stash the output XML.
35-
// stash includes: 'robot_output/**', name: 'Firefox'
36+
sh "robot -d robot_output -l none -r none -o firefox.xml -N Firefox -v URL:${params.URL} --nostatusrc $d/suites/"
37+
stash includes: 'robot_output/**', name: 'Firefox'
3638
}
3739
}
3840
}
@@ -44,9 +46,8 @@ pipeline {
4446
reuseNode true
4547
} }
4648
steps {
47-
// If reuseNode true was not used, we would have to unstash the output XMLs.
48-
// unstash 'Chromium'
49-
// unstash 'Firefox'
49+
unstash 'Chromium'
50+
unstash 'Firefox'
5051
sh "rebot -d rebot_output -o output.xml -N '${env.JOB_BASE_NAME} ${BUILD_DISPLAY_NAME}' --nostatusrc robot_output/*.xml"
5152
}
5253
}

0 commit comments

Comments
 (0)