This is a simple app, which demonstrates how to make use of Jenkins Pipelines in Android development. As a source app was chosen [Topeka][1].
These steps are specified in Jenkinsfile
- Checkout from source control management, e.g. git, bitbucket
assemble
(assembles only build type that was specified in as a parameter of Jenkins job), e.g.assembleDebug
- Unit tests
- Instrumented tests
Also sends a detailed email when jenkins job fails.
Runs specified test classes on specified emulators. E.g. you have multiple emulators and you want to run particular tests on particular emulators.
This assumes, that emulators are already started on Jenkins machine on specified ports:
emulator -ports 5554,5555 @emu1_nexus_10_2560_1600_api_21 -verbose -no-boot-anim -no-window
Then 5554
is being set as a value of variable PORT_EMU_1
of Jenkins job. See usage of these variable in Jenkinsfile
.
Also sharing Jenkins configuration
[1]: https://github.com/googlesamples/android-topeka "Topeka"