This repository was archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathJenkinsfile
More file actions
110 lines (107 loc) · 2.51 KB
/
Jenkinsfile
File metadata and controls
110 lines (107 loc) · 2.51 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/env groovy
def branch = env.BRANCH_NAME ?: 'master'
/** Desired capabilities */
def capabilities = [
browserName: 'Firefox',
version: '66.0',
platform: 'Windows 10'
]
pipeline {
agent any
libraries {
lib('fxtest@1.10')
}
triggers {
pollSCM(branch == 'master' ? 'H/5 * * * *' : '')
cron(branch == 'master' ? 'H H * * *' : '')
}
options {
ansiColor('xterm')
timestamps()
timeout(time: 1, unit: 'HOURS')
}
environment {
PYTEST_PROCESSES = "${PYTEST_PROCESSES ?: "auto"}"
PYTEST_ADDOPTS =
"-n=${PYTEST_PROCESSES} " +
"--tb=short " +
"--color=yes " +
"--driver=SauceLabs " +
"--variables=capabilities.json"
PULSE = credentials('PULSE')
SAUCELABS = credentials('SAUCELABS')
}
stages {
stage('Lint') {
agent {
dockerfile true
}
steps {
sh "tox -e flake8"
}
}
stage('Test') {
parallel {
stage('py36') {
agent {
dockerfile true
}
steps {
writeCapabilities(capabilities, 'capabilities.json')
sh "tox -e py36"
}
post {
always {
stash includes: 'results/py36.html', name: 'py36'
archiveArtifacts 'results/*'
junit 'results/*.xml'
}
}
}
stage('py27') {
agent {
dockerfile true
}
steps {
writeCapabilities(capabilities, 'capabilities.json')
sh "tox -e py27"
}
post {
always {
stash includes: 'results/py27.html', name: 'py27'
archiveArtifacts 'results/*'
junit 'results/*.xml'
submitToActiveData('results/py27_raw.txt')
submitToTreeherder('fxapom', 'T', 'Tests', 'results/*', 'results/py27_tbpl.txt')
}
}
}
}
}
}
post {
always {
unstash 'py36'
unstash 'py27'
publishHTML(target: [
allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'results',
reportFiles: "py36.html, py27.html",
reportName: 'HTML Report'])
}
changed {
ircNotification()
}
failure {
emailext(
attachLog: true,
attachmentsPattern: 'results/*.html',
body: '$BUILD_URL\n\n$FAILED_TESTS',
replyTo: '$DEFAULT_REPLYTO',
subject: '$DEFAULT_SUBJECT',
to: '$DEFAULT_RECIPIENTS')
}
}
}