forked from sauce-archives/Java-TestNG-Selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
23 lines (21 loc) · 824 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
node {
// Mark the code checkout 'stage'....
stage 'Checkout'
// Get some code from a GitHub repository
checkout scm
// Note: if this is copy and pasted into pipeline script, the following will work while the above handles branches and such
// git url: 'https://github.com/saucelabs-sample-test-frameworks/Java-TestNG-Selenium.git'
docker.image('maven:3.3.9-jdk-7').inside {
stage 'Compile'
sh "mvn compile"
stage 'Test'
sauce('saucelabs') {
sauceconnect(useGeneratedTunnelIdentifier: true, verboseLogging: true) {
sh "mvn test"
}
}
}
stage 'Collect Results'
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
step([$class: 'SauceOnDemandTestPublisher'])
}