-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile
42 lines (37 loc) · 1.35 KB
/
Jenkinsfile
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
#!groovy
node('xnetPython') {
currentBuild.result = "SUCCESS"
// Environment variables to configure the hardware for testing. This scope applies to all stages
environment {
CAN_FIXTURE_IN_INTERFACE = 'CAN1'
CAN_FIXTURE_OUT_INTERFACE = 'CAN2'
LIN_FIXTURE_IN_INTERFACE = 'LIN1'
LIN_FIXTURE_OUT_INTERFACE = 'LIN2'
}
try{
stage('Checkout'){
// Checkout the repository from scm
echo "Checking out source"
checkout scm
}
stage('EnvironmentSetup'){
// Stage to setup environment variables and ensure correct testing environment.
bat 'pip install --upgrade setuptools'
}
stage('Testing'){
// Run tox with the tox-integration.ini file in the root of the repository
echo "Running Tox integration script"
try {
bat 'tox -c tox-integration.ini -e py27-test -- --can-in-interface CAN1 --can-out-interface CAN2 --lin-in-interface LIN1 --lin-out-interface LIN2'
bat 'tox -c tox-integration.ini -e py34-test -- --can-in-interface CAN1 --can-out-interface CAN2 --lin-in-interface LIN1 --lin-out-interface LIN2'
} finally {
step([$class: 'CoberturaPublisher', coberturaReportFile: 'coverage.xml'])
junit "junit/*.xml"
}
}
}
catch (err) {
currentBuild.result = "FAILURE"
emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']])
}
}