WORKING in a team, all the code can be put in a central version control system like GitHub.
Developers will pull and push cods\es regularly.
Thus our software will be created and will be saved in a Artifact repository.This is generated from the build process.
This artifact will be packaged in a specific format.
It is War/jar for Java.DLL/EXE/MSI in windows. Moreover, it can be in ZIP or tar.
Then it has to be shifted from repository to the servers.
After deploying this artifact into the servers, testers can run testing.
Once it is approved, it is shipped to production servers.
So, that's how it works.
But lets see what problem arises in this cycle.
After the coders complete coding , they push it to GitHub.
Assuming they have coded for 3 weeks and now need rest.
Thus developers team need to fix all of these issues.
This could have been resolved if the problem was detected very early in the process.
The developers could get notify when the error occurs and could code accordingly . But it was not detected.
Thus what could be the solution?
After every commit by the coders, the code should be build and tested. Right? Thus finding issue or error would be easier and a developer can easily solve it.
As developers will build and test multiple times a day, it is manually impossible or tiresome. Thus, automate it!
So, when a developer commits any code it will automatically go to the server and get build and tested.
As soon as the developer finds and issue,he/she will resolve it.
He/ she will commit again fixing the issue.
Again it will go to the servers and build and test will be run. It found no issue, it will be stored in the software repository.
Therefore, after a successful testing , it will automatically go through all other steps we previously mentioned.
Let's see a cyclic view.
The goal of CI is to detect issues in a very early stage.
So, these are the tools used:
- Integrated with a version control system.
- Build tools based on the programming languages.
- Software repositories to store artifacts.
- CI Tools that integrates everything.