Download TeamCity archive and follow installation instructions.
Basic installation:
- extract TeamCity from archive
- edit
TeamCityFolder/buildAgent/conf/buildAgent.properties
if needed (server url, etc.) - execute
TeamCityFolder/bin/runAll.sh start
to start TeamCity server - open TeamCity server page (address can be found in
TeamCityFolder/buildAgent/conf/buildAgent.properties
) and finish configuration.
-
TeamCity initiates first project configuration on configuration step. Also, is possible to create project in
Administration -> Projects -> Create project
-
On successful project import, project will have Github connection set up and ready to automatically start builds when change is pushed to remote repository:
-
Configure build steps (TeamCity will try to automatically detect basic build steps (like
clean assemble
gradle tasks) on project import): -
Configure
Build
build step: -
Configure
Unit tests
build step: -
Configure
Static Code Analysis
build step: -
Configure
UI tests
build step:Shell script content can be found in
ui_tests_on_emulator.sh
file. -
Configure
Upload to Fabric
build step: -
Configure email notifications in settings
Administration -> ServerAdministration -> Email Notifier
(SMTP server information is required)and email notification rules in
Administration -> Groups -> All Users -> Notification Rules
: -
Configure environment variables used in build steps. Create Environment Variables using "Add new parameter" button:
-
Configure build artifacts
which will be published after the build and can be found in "Artifacts" tab:
-
Configure JaCoCo code coverage report in
jacoco.gradle
file:if (project.hasProperty("teamcity")) { println '##teamcity[jacocoReport dataPath=\'app/build/jacoco/testDebugUnitTest.exec\' includes=\'com.vgaidarji.cimatters.*\' excludes=\'com.vgaidarji.cimatters.test.* **/*R*.* **/*Injector*.* **/*Activity*.* .*R .*CiMattersApplication .*BuildConfig .*Activity .*Test \']' }
Coverage information will be available in
Overview
tab or inCode Coverage
tab: