Jenkins: streamlining development with a completely free CI/CD solution
Something for free? In 2023? Never.
We feel the collective sigh of everyone as continue navigating the forever increasing subscription-driven digital world in which we live.
As all modern services, from entertainment platforms to software tools, vie for attention with monthly fees, businesses — not just individuals — are becoming more conscious of the list of ever-growing financial commitments. We’re no different.
For software companies like Ascend, our ability to deliver high-quality applications swiftly has become ourcompetitive advantage.
Continuous Integration and Continuous Deployment (CI/CD) have emerged as pivotal practices that enable our team to automate processes, reduce errors and accelerate delivery of software, features and fixes to the market.
In this article, we’ll dive into the world of CI/CD and discuss how we use Jenkins, a free and open-source automation server and explore how it’s revolutionised our development lifecycle.
What is CI/CD? 🤔
CI/CD is an approach to software development that emphasises automation, collaboration and iterative improvements.
It comprises two fundamental practices:
- Continuous Integration (CI): our developers integrate their code changes into a GitHub repository multiple times a day. We have a human-led code review alongside automated tests, which help detect integration issues early and ensure the codebase remains stable.
- Continuous Deployment (CD): after a successful integration, changes are automatically deployed to an environment, such as staging or production. CD aims to minimise manual interventions, reducing deployment errors and ensuring a more consistent application delivery.
Jenkins, an open-source automation server, plays a pivotal role in allowing us to realise the benefits of CI/CD. Its flexibility, extensibility and active community support make it a popular choice among developers.
Plus, it’s free.
Setting Up Jenkins 🎬
Jenkins can be installed on various platforms, we have it installed on Ubuntu. It offers traditional installation as well as for Docker containers.
Once installed, Jenkins is accessed via a web browser. The initial setup involves configuring security settings, plugins and administrative users.
Creating a CI/CD pipeline 👩💻
Creating a CI/CD pipeline in Jenkins involves a series of stages that automate the development process:
- Code checkout: The pipeline begins by fetching the latest code from the version control system, ensuring that the developer’s changes are included. This typically looks to a specific branch: we have branches named
release— for which different environments deploy to different locations.
- Build and test: Jenkins triggers automated build processes and runs unit tests to validate our code’s integrity. Any failures are flagged to the team for immediate attention.
- Static code analysis: Plugins integrated with Jenkins can perform static code analysis to identify coding standards violations, security vulnerabilities and potential bugs.
- Integration tests: At this stage, integration tests are executed to ensure that different components of the application work as expected.
- Deployment to staging: Once all our tests pass, Jenkins deploys the code to our staging environment, allowing stakeholders to review the changes and provide feedback before we deploy to production.
- User Acceptance Testing (UAT): If necessary, Jenkins can trigger UAT processes, where end-users validate the changes in a controlled environment. We don’t do this specifically, but it’s worth highlighting.
- Deployment to Production: After successful UAT, either through or outside of Jenkins, we move code to
releaseand the pipeline deploys our code to the production environment, completing the CI/CD cycle.
Benefits of Jenkins vs manual deployments 💪
- Automation: Jenkins automates repetitive tasks, reducing manual intervention and minimising human error.
- Faster Time-to-Market: CI/CD shortens development cycles, enabling rapid feature delivery and quicker responses to market demands.
- Simplified management: Jenkins encourages simplification by providing a centralised platform for development, testing and deployment activities.
- Reliable deployments: Automated testing and consistent deployment processes ensure reliable and predictable software version releases.
- Feedback loop: Early detection of issues through automated tests and feedback loops means our developers can address problems promptly.
Jenkins has transformed the way our software is developed, tested and deployed by opening up the CI/CD approach to our team.
As a free and open-source solution, it was a no-brainer solution for our developers to use to build efficient and reliable pipelines. Embracing Jenkins was more than just adopting a tool; it’s was about embracing a culture of automation and continuous improvement that drives our software development forward in an ever-evolving landscape.