-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
59 lines (58 loc) · 1.89 KB
/
Jenkinsfile
File metadata and controls
59 lines (58 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
String d = "docs/tutorials/jenkins/parallel-robot-pipeline"
pipeline {
agent any
parameters {
string(
name: 'URL',
defaultValue: '',
description: 'Target URL for the Robot Framework tasks')
}
stages {
stage('Run tasks') {
parallel {
stage('Chromium') {
agent { docker {
image 'ghcr.io/cicd-tutorials/robot-browser:latest'
args '--entrypoint=""'
reuseNode true
} }
steps {
sh "robot -d robot_output -l none -r none -o chromium.xml -N Chromium -v URL:${params.URL} --nostatusrc $d/suites/"
// If reuseNode true was not used, we would have to stash the output XML.
// stash includes: 'robot_output/**', name: 'Chromium'
}
}
stage('Firefox') {
agent { docker {
image 'ghcr.io/cicd-tutorials/robot-browser:latest'
args '--entrypoint=""'
reuseNode true
} }
steps {
sh "robot -d robot_output -l none -r none -o b.xml -N Firefox -v URL:${params.URL} --nostatusrc $d/suites/"
// If reuseNode true was not used, we would have to stash the output XML.
// stash includes: 'robot_output/**', name: 'Firefox'
}
}
}
}
stage('Process logs') {
agent { docker {
image 'ghcr.io/cicd-tutorials/robot-browser:latest'
args '--entrypoint=""'
reuseNode true
} }
steps {
// If reuseNode true was not used, we would have to unstash the output XMLs.
// unstash 'Chromium'
// unstash 'Firefox'
sh "rebot -d rebot_output -o output.xml -N '${env.JOB_BASE_NAME} ${BUILD_DISPLAY_NAME}' --nostatusrc robot_output/*.xml"
}
}
}
post {
success {
robot outputPath: 'rebot_output', otherFiles: '**/*.png', passThreshold: 100.0, unstableThreshold: 0.0
}
}
}