-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
32 lines (29 loc) · 834 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
24
25
26
27
28
29
30
31
32
pipeline {
agent { docker {
image 'anthonymonori/android-ci-image'
//arugment to execute everything as a sudoer
args '-u root:sudo'
}
}
stages {
stage('Git') {
// Get some code from a GitHub repository
steps{
git 'https://github.com/markrity/android-unit-test-example.git'
}
}
stage('Run Tests'){
steps{
sh """
yes | sdkmanager --licenses
./gradlew test
"""
}
}
stage('Publish Test Results'){
steps{
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'app/build/reports/tests/testReleaseUnitTest', reportFiles: 'index.html', reportName: 'HTML Report', reportTitles: ''])
}
}
}
}