74 строки
1.7 KiB
Groovy
74 строки
1.7 KiB
Groovy
/** Desired capabilities */
|
|
def capabilities = [
|
|
browserName: 'Firefox',
|
|
version: '57.0',
|
|
platform: 'Windows 10'
|
|
]
|
|
|
|
pipeline {
|
|
agent any
|
|
libraries {
|
|
lib('fxtest@1.9')
|
|
}
|
|
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 " +
|
|
"--log-raw=results/py27_raw.txt " +
|
|
"--log-tbpl=results/py27_tbpl.txt"
|
|
PULSE = credentials('PULSE')
|
|
SAUCELABS = credentials('SAUCELABS')
|
|
}
|
|
stages {
|
|
stage('Lint') {
|
|
steps {
|
|
sh "tox -e flake8"
|
|
}
|
|
}
|
|
stage('Test') {
|
|
steps {
|
|
writeCapabilities(capabilities, 'capabilities.json')
|
|
sh "tox -e py27"
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts 'results/*'
|
|
junit 'results/*.xml'
|
|
submitToActiveData('results/py27_raw.txt')
|
|
submitToTreeherder('fxapom', 'T', 'Tests', 'results/*', 'results/py27_tbpl.txt')
|
|
publishHTML(target: [
|
|
allowMissing: false,
|
|
alwaysLinkToLastBuild: true,
|
|
keepAll: true,
|
|
reportDir: 'results',
|
|
reportFiles: "py27.html",
|
|
reportName: 'HTML Report'])
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
failure {
|
|
emailext(
|
|
attachLog: true,
|
|
attachmentsPattern: 'results/py27.html',
|
|
body: '$BUILD_URL\n\n$FAILED_TESTS',
|
|
replyTo: '$DEFAULT_REPLYTO',
|
|
subject: '$DEFAULT_SUBJECT',
|
|
to: '$DEFAULT_RECIPIENTS')
|
|
}
|
|
changed {
|
|
ircNotification()
|
|
}
|
|
}
|
|
}
|