+ -

Pages

2015-10-04

What is continues integration?


What is continues integration?

Continues integration, short as CI is modern way to integrate, build and test software project in centralized location. Now a days in a big and small software project developing teams are using CI for build and test theirs developments.



What are the benefits of CI?

1.          Reduce manually build effort, time and errors.
When the software project start with the team each developer developing a part by part of the project. In  this situation it will be rise lot of errors because some reasons like source code     mismatching, runtime errors, compile errors etc. frequently testing in the development environment is little bit difficult because it should have reunion all source codes and built for export current development to the testing team. If we using CI practice it will do this tricky work for us and additionally test the provided test cases.

2.           Automate the build
When we commit development changes to source code version controller system (git,svn)  CI listen vcs changes and it build new version with newly added features automatically.

3.          Keep the build fast
     If the CI server is more powerful build and test is finish quickly.

4.         Everyone can see what’s happening
     Team leads, PM, Testers, Developers everyone can get status what happening and what is the project situation. Really where we are.

5.             Automate deployment
Can directly deployed project to production environment if it is release.

6.             Ability of build to production for test environments
For the testing purposes end experiments CI builds can export to different test environments.
               
Working with CI

              Now I think now we know about what is CI and next step is how to work with CI server. My private opinion is TeamCity is best and easy CI server for the development team. It has lot of features and support several of programming languages and test scripts. Also it has big extra plugin store  https://www.jetbrains.com/teamcity/plugins/   TeamCity is product of JetBrains Company. Jetbrain is owner of these great products IntelliJ IDEA, YouTrack, PhpStorm TeamCity is free product(Commercial version is available ) You can download TeamCity from https://www.jetbrains.com/teamcity/download/  It’s available for all platforms. 




Let’s check how the installation process.
1.       Run the setup with administrator privileges.


2.

3.Set the installation location  as you wish. 

4. Select all to install everything.

5. Set the team city data path this location will save your all Build configurations and build data.

6.      

7.       Set Team City running port. TC default port is 80 if you’re like you can change it
                 For my installation I change it to 8029 because my port 80 using by apache web server.


8.       Now you can see the build agent properties if you need you can add, delete or change properties.

9.       If firewall ask for permission allow access.

10.  


11.   Select what is the user group for run TeamCity server
 
















12.    

    
13.   Start the server 


14.   Now Server will open via web browser.



15.  Set user password

    
 16.  Now fill profile details and save


 17. Now go to the Projects section.

In this example I will show how to configure android gradle project in TeamCity.
1.       First of all I create an android project and push it to my github account.
If you have version control system (VCS ) you can use it for this purpose.
Bitbucket is also ok for this.




2.       Then click create project from URL and fill the form with your details. After click Proceed.
 
 


3.       Now change build project name or build configuration name if you need.

4.       Now setup will auto detected build steps. I’m go forward with gradle build tool. Sometime this step is difficult when it not detects automatically.




5.   Now set the Triggers. Triggers will start your build process scheduled. There is lot of configuration types. This time I use VCS trigger its meaning it start build after changes commit to the VCS.


6.       Go parameters and set SDKs parameters. You should set your android home and gradle home locations in your CI server



7.       Now this enough for our build setup then click run button it will start build process.



8.       It will download necessary dependencies (gradle package) if you not pre install gradle

 
9.       If something is wrong, you can find it easily check the build log.


10.   Now my build is successfully finish. After solve the problem.



11.    Now you can download and install apk from your android mobile by TeamCity downloader application.



Set your server configurations and port. Remember access allow TeamCity port through your server firewall.






When your commit to Github will be automatically build. This is a very simple example. Team city has large range of build methodology you can try you wish. You can use Teamcity agents for create distributed build system and speed up your build process using another computer processing speed.


wrote by chathuranga bandra
2015-09-28

5 chathunz: What is continues integration? What is continues integration? Continues integration, short as CI is modern way to integrate, build and test software project in cen...

No comments:

Post a Comment