Created
August 29, 2017 02:54
-
-
Save bltuckerdevblog/60c823fc041b4921e64658a0298e8fa3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node { | |
stage 'Checkout' | |
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/abnormallydriven/android-ci-example.git']]]) | |
sh "./gradlew clean" | |
stage 'Unit Test' | |
sh "./gradlew test" | |
stage 'Assemble Android Test' | |
sh "./gradlew assembleDebug" | |
sh "./gradlew assembleDebugAndroidTest" | |
stage 'Cloud Test Lab' | |
sh "gcloud auth activate-service-account --key-file /opt/service_account_key.json" | |
sh "gcloud firebase test android run --project ${env.gcloud_project_id} --app app/build/outputs/apk/app-debug.apk --test app/build/outputs/apk/app-debug-androidTest.apk --device model=Nexus6,version=22,locale=en,orientation=portrait" | |
stage 'Build Release' | |
sh "./gradlew assemble" | |
stage 'Archive' | |
step([$class: 'ArtifactArchiver', artifacts: 'app/build/outputs/apk/*.apk', fingerprint: true]) | |
step([$class: 'JUnitResultArchiver', testResults: 'app/build/test-results/**/TEST-*.xml']) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment