You may have heard this weird little acronym floating around the web.
But what the heck is it?
And should you use it as a software developer?
Read on to find out!
CI/CD is an acronym for continuous integration/continuous deployment.
But it can also mean continuous integration/continuous delivery (more on the differences below).
Basically, CI/CD automates:
- your builds
- your tests
- your deployments
And like all good pieces of software, a good CI/CD workflow is going to save you time.
This gives the boss a happy face!
It also prevents you, the developer, from flipping your desk over in an epic rage quit. Woot!
A few of the benefits of CI/CD include:
- Reduced production & staging errors
- Makes bugs easier to find & remove
- Easy rollbacks since changes are small & incremental
- Increase in team productivity
- Rapid feedback including automated code analysis & code health report
- Competitive advantage: you can get feedback from customers faster
- No more manual FTP deployment
Continuous integration isn’t necessarily a particular tool.
Think of it more as a workflow or setup. And the CI tool(s) you choose lets you execute that workflow.
For example, there’s a CI tool called Jenkins.
Here’s what a CI process might look like if you were using Jenkins:
Developers push code to a repo frequently. This could include patches, updates, and new functionalities.
Once pushed, a Jenkins build server tests that code.
Jenkins shows developers if their code has passed or failed.
If code fails: Fix code and repeat steps 1-3.
If code passes: Send to deployment environment.
In this flow, broken builds become a priority before building the next feature.
Continuous deployment is the second part of the “CI/CD” equation.
And it ensures your software can be released on demand. Deployments are fast and frequent.
Remember the process from the CI section above?
Once the code passes the tests, it’s pushed to its final phase: the deployment environment.
This whole process has a name. It’s called a deployment pipeline. Further, all code changes you make go through this pipeline.
A deployment pipeline (or CI/CD pipeline) a series of validations your code flows through before it’s released to production.
For example, a simple pipeline could consist of these phases:
Image via semaphoreci.com
And here’s a theoretical pipeline for a Go project:
Image via semaphoreci.com
These example pipelines may look relatively straightforward. However, they can get complex quickly:
Image via Medium
Do remember that pipelines vary from company to company, project to project.
Continuous deployment simply means all changes go through a pipeline. They’re automatically deployed into production.
On the other hand, continuous delivery means means developers must manually approve the deployment.
Then once approved, the pipeline continues its automation.
Image via crisp.se
To illustrate another way:
Image via RedHat
Some popular CI/CD tools include:
- Travis CI
While some CI/CD tools are totally free, some are freemium and some are paid tier only.
Additionally, many are available as part of the GitHub student developer pack. This includes Travis CI.
So if you’re a student, read this GitHub post to check your eligibility.
Also, GitHub announced in 2019 that GitHub actions now supports CI/CD. This is a free feature available to public repos.
Is CI/CD is an incredibly powerful mechanism for your workflow? Yes.
But learning the basics of programming and workflow management 101 (i.e. Git workflow) is more important as an aspiring developer.
Give it a try!
Because if you plan on working in the industry as a software developer, there’s a good chance you’ll be using some sort of automation.
Thus, getting familiar with continuous integration & continuous deployment/delivery, even as a solo dev, is good practice.
Absolutely. If you have a DevOps team, there’s a good chance they’ve implemented (or plan on implementing) a CI/CD workflow.
But if you don’t have a DevOps team, you can still get up and running with CI/CD.
In summary, CI/CD is a way to automate your builds, tests and deployments.
There are lots of open source tools available.
But there are also paid options if you need the upgrade.
At the end of the day, continuous integration and continuous deployment/delivery can save time and money.
Lastly, if you’re on a dev team, it’s something you should seriously consider using.
Are you using CI/CD? If so, what tools do you prefer?