Simple CI/CD Pipeline

By hosurfamily No comments

Depending on the maturity of your organization, DevOps evolution becomes necessary. Here is an attempt to conceptualize CI/CD for single source system application. Since we cannot chew everything at once, I recommend two phases if we don’t count the optimization that needs to be done prior to this phase at the repository. For phase 0, implement Bitbucket or Git in order to leverage the automation frameworks such as Jenkins, Bamboo or Concourse.

Phase I recommends, that we automate all the deployments. It is easy to begin the journey there since you will find scripts that are used for deployment manually. These scripts can be “as is” leveraged to automate the pipeline. A word of caution is to delay the deployment to production automation until the kinks are worked out in the lower environments. This will prevent any untested scenarios to trickle into production causing errors.

Once the deployments are smooth, we move on to the Phase II of the implementations. During this phase, all the testing (Unit testing, Integration testing, Regression testing etc.,) activities need to be automated. This process can take long time depending on the robustness of the QE/QA department in your organization.

The above represents a reference architecture and in my personal opinion Jenkins framework provides the easiest way to automate the pipeline. The following pipeline, I created within few hours demonstrates the robustness of the solution. Here a docker instance of Jenkins, BlueOcean is created. Then used a simple python script checked into git repository to demonstrate the concept. The pipe line has simple pipeline: start->Build->Test->Deliver->End. The pipeline starts by checking out the code, then compiles it and runs unit tests before delivering the results file and terminates the flow.