2017-04-13 19:34:30 +03:00
|
|
|
@Library('fxtest@1.6') _
|
2017-01-20 22:05:36 +03:00
|
|
|
|
|
|
|
|
2017-02-22 21:29:12 +03:00
|
|
|
/** Desired capabilities */
|
2017-01-20 22:05:36 +03:00
|
|
|
def capabilities = [
|
|
|
|
browserName: 'Firefox',
|
2017-06-21 12:19:06 +03:00
|
|
|
version: '54.0',
|
2017-03-01 12:54:11 +03:00
|
|
|
platform: 'Windows 10'
|
2017-01-20 22:05:36 +03:00
|
|
|
]
|
|
|
|
|
2017-02-22 21:29:12 +03:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
options {
|
2017-03-14 21:33:39 +03:00
|
|
|
ansiColor('xterm')
|
2017-02-22 21:29:12 +03:00
|
|
|
timestamps()
|
|
|
|
timeout(time: 1, unit: 'HOURS')
|
2017-01-20 22:05:36 +03:00
|
|
|
}
|
2017-02-22 21:29:12 +03:00
|
|
|
environment {
|
2017-04-25 15:25:55 +03:00
|
|
|
PYTEST_ADDOPTS =
|
|
|
|
"-n=10 " +
|
|
|
|
"--tb=short " +
|
|
|
|
"--color=yes " +
|
|
|
|
"--driver=SauceLabs " +
|
|
|
|
"--variables=capabilities.json " +
|
|
|
|
"--log-raw=results/py27_raw.txt " +
|
|
|
|
"--log-tbpl=results/py27_tbpl.txt"
|
2017-03-31 23:31:31 +03:00
|
|
|
PULSE = credentials('PULSE')
|
2017-02-22 21:29:12 +03:00
|
|
|
SAUCELABS_API_KEY = credentials('SAUCELABS_API_KEY')
|
2017-01-20 22:05:36 +03:00
|
|
|
}
|
2017-02-22 21:29:12 +03:00
|
|
|
stages {
|
|
|
|
stage('Lint') {
|
|
|
|
steps {
|
|
|
|
sh "tox -e flake8"
|
|
|
|
}
|
2017-01-20 22:05:36 +03:00
|
|
|
}
|
2017-02-22 21:29:12 +03:00
|
|
|
stage('Test') {
|
|
|
|
steps {
|
|
|
|
writeCapabilities(capabilities, 'capabilities.json')
|
|
|
|
sh "tox -e py27"
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts 'results/*'
|
|
|
|
junit 'results/*.xml'
|
2017-03-31 23:31:31 +03:00
|
|
|
submitToActiveData('results/py27_raw.txt')
|
|
|
|
submitToTreeherder('fxapom', 'T', 'Tests', 'results/*', 'results/py27_tbpl.txt')
|
2017-02-22 21:29:12 +03:00
|
|
|
publishHTML(target: [
|
|
|
|
allowMissing: false,
|
|
|
|
alwaysLinkToLastBuild: true,
|
|
|
|
keepAll: true,
|
|
|
|
reportDir: 'results',
|
|
|
|
reportFiles: "py27.html",
|
|
|
|
reportName: 'HTML Report'])
|
2017-01-20 22:05:36 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-02-22 21:29:12 +03:00
|
|
|
post {
|
|
|
|
failure {
|
|
|
|
mail(
|
|
|
|
body: "${BUILD_URL}",
|
|
|
|
from: "firefox-test-engineering@mozilla.com",
|
|
|
|
replyTo: "firefox-test-engineering@mozilla.com",
|
|
|
|
subject: "Build failed in Jenkins: ${JOB_NAME} #${BUILD_NUMBER}",
|
|
|
|
to: "fte-ci@mozilla.com")
|
|
|
|
}
|
|
|
|
changed {
|
|
|
|
ircNotification()
|
2017-01-20 22:05:36 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|