An Introduction to Build Servers and Continuous Integration
Let's explore why build servers are important and why they ultimately help you deploy through your pipeline with more confidence.
Join the DZone community and get the full member experience.Join For Free
When you're developing and deploying software, one of the first things to figure out is how to take your code and deploy your working application to a production environment where people can interact with your software.
Most development teams understand the importance of version control to coordinate code commits and build servers to compile and package their software, but continuous integration (CI) is a big topic.
Build servers have 3 main purposes:
- Compiling committed code from your repository many times a day
- Running automatic tests to validate code
- Creating deployable packages and handing off to a deployment tool
Without a build server, you're slowed down by complicated, manual processes and the needless time constraints they introduce. For example, without a build server:
- Your team will likely need to commit code before a daily deadline or during change windows.
- After that deadline passes, no one can commit again until someone manually creates and tests a build.
- If there are problems with the code, the deadlines and manual processes further delay the fixes.
Without a build server, the team battles unnecessary hurdles that automation removes. A build server will repeat these tasks for you throughout the day and without those human-caused delays.
But CI doesn’t just mean less time spent on manual tasks or the death of arbitrary deadlines, either. By automatically taking these steps many times a day, you fix problems sooner and your results become more predictable. Build servers ultimately help you deploy through your pipeline with more confidence.
Jenkins is the most popular CI platform on the market. Open-source and free to use, you can run Jenkins standalone on most operating systems to automate the building and testing of your code.
One of Jenkins' biggest benefits is its flexibility. It's a scalable platform, meaning you can expand its capabilities as your team or project needs to grow. And thanks to its huge community, there are over 1800 plugins, making it easy to integrate with countless industry tools.
That means Jenkins is flexible enough to cover your CI needs and you can tailor it for other automation purposes too.
GitHub Actions is one of the newer CI platforms. It removes the need for a separate build server by using repository events to trigger automation workflows on virtual ‘runners’.
If you're using GitHub as your code repository, the good news is that you already have access — GitHub Actions is included in your existing repos.
Where’s the catch? While public repositories can use GitHub Actions for free, it’s pay-as-you-go for everyone else, billed per minute for the time workflows take to run. All users get free monthly minutes, though, and you’re only charged if you exceed the number allowed by your plan.
Like Jenkins, GitHub also has an actions marketplace brimming with community-created apps and workflows to help with continuous integration and more.
Published at DZone with permission of Andy Corrigan. See the original article here.
Opinions expressed by DZone contributors are their own.