Skip to content

Continuous Integration

Shivam edited this page Jan 17, 2022 · 1 revision

A Continuous Integration(CI) pipeline is a series of steps that must be performed in order to deliver a new version of software. Continuous Integration is a software development method where members of the team can integrate their work at least once a day. In this method, every integration is checked by an automated build to search the error.

Stages of a CI Pipeline

  • Check-in/Source Code
  • Build and Unit Test
  • SonarQube
  • Integration Test

CI Pipeline Workflow

CiPipelineUpdated

1. Check-in/Source Code

Check-in/Source Code - In the source stage, CI pipeline is triggered by a code repository. Any change in the program triggers a notification to the CI tool that runs an equivalent pipeline.

These are the All Workflows,

CI_Stages1

2. Build and Unit Test

Build - The stage where the application is compiled. This is the second stage of the CI/CD Pipeline in which you merge the source code and its dependencies. It is done mainly to build a runnable instance of software.

Build running steps -

CI_StagesBuild1

Build Succeeded -

CI_StagesBuild2

CI Build result shows the number of unit test cases in project,

UnitTest7(CiBuild)

3. SonarQube Analysis

SonarQube is an Open Source tool for continuous inspection of code quality. SonarQube has a collection of rules to analyze source code at compile time to identify potential vulnerabilities, bugs, anti-patterns, refactoring and poor coding practices.

Sonar Scan running steps -

CI_StagesSQ1

SonarScan Passed Result -

CI_StagesSQ2

4. SonarQube Quality Gate

Quality Gates are the set of conditions a project must meet before it should be pushed to further environments. It is combination of various conditions, against which SonarQube server measures project quality thresholds. Quality Gates considers all of the quality metrics for a project and assigns a passed or failed designation for that project.

CI_QG

5. Docker-Compose

Compose is a tool for defining and running multi-container Docker applications. We have a docker-compose.yml file at the root of our repository which starts a SQL Server container for us.

docker-compose up 

This command builds, (re)creates, starts, and attaches to containers for a service.

6. Integration Test

Integration Test - Test Stage includes the execution of integration tests to validate the correctness of code and the behaviour of the software. This stage prevents easily reproducible bugs from reaching the clients.

Integration Test running steps -

CI_StagesIT1

These are total integration test cases in project and the test result which is passed.

IntegrationTest(Build2)

Clone this wiki locally