Ready to mature your development practices with Continuous Integration (CI)? Whether driven by risk management practices, or aligning with industry best practices, integrating a CI solution can significantly benefit your team.
Getting Started with CI in a legacy project:
- Engage Your Development Team:
- Ensure that the key stakeholders are onboard, and all other stakeholders are engaged.
- Choose Basic Tools and Repository:
- Ensure that all code is stored in a repository.
- Select a storage location for the compiled artifacts.
- Implement the CI:
- Background work, or try
1. Engage with Development Team:
To ensure that this is large change is more likely to succeed, you need have buy-in from key stakeholders. Some of the topics for discussion that help gain buy-in include:
- Team Growth Management:
- Ease the growing pains of an expanding team. CI helps document processes, making them transparent and accessible to all team members.
- Automated Builds:
- Focus your development team on delivering value by automating non-value-added processes like builds. Further automate with systems that update dependencies and test compatibility.
- Shared Build Responsibility:
- Mitigate the risk of the “bus factor”1 by ensuring more team members know how to build the software, reducing reliance on a single individual.
- Foundation for Future Improvements:
- Once CI is in place, it’s easier to implement additional enhancements like build states, issue resolution, and security checks.
- Enhanced Software Security:
- Identify and address vulnerabilities in your software dependencies using CI plugins. Prevent known vulnerable code from reaching production.
- Better stakeholder communications:
- The automation of the build states allows for self-served pull information for stakeholders without the need for a request of an update.
2. Key Decisions:
Before the implementation of the CI system there are two key, Important Technical Decisions (ITD) that need to be made:
- Choose the appropriate CI system.
- Select an artifact repository.
Ensure your team uses essential tools like a central repository (GitHub, GitLab, Azure DevOps). Many repositories already offer CI functions but consider tools like Jenkins or JFrog if needed. The CI system is an ITD as once you start using it, it is a lot of work to move to another.
Determining the storage location of the built artifacts is critical, but less important than the CI system. This may be as simple as storing the binaries in Azure Blob, or AWS S3; or a complete artifact management system that considers additional meta data.
3. Legacy Project CI Implementation:
There are two options for deploying the CI. For systems that the build is known to be complex, planning how to deploy the CI with the guide below. Or for simple systems, just starting to use the CI.
Planning
- Identify CI Requirements:
- Clarify the dependency chain and remove ambiguity by asking:
- What operating system is required? (Windows/Linux, x86/64)
- What OS dependencies or features are needed? (IIS, systemd)
- What additional applications are required? (Apache, Adobe, print drivers, SQL Server)
- Are dependencies in the code explicitly stated for package managers? (NuGet, Crate, Anaconda/PIP)
- Are configuration files/systems known? (conf, ini, json, environment variables, yaml)
- Are any secrets required for the build? (API keys, encryption keys)
- Determine the pipeline tool to use.
- Determine the destination of the
- Clarify the dependency chain and remove ambiguity by asking:
- Initial CI Pipeline Setup:
- Use tools like Git or your IDE to create a new CI pipeline. The initial goal is to have a sucessful build process:
- Setup the CI environment with dependencies.
- Clone the repo into the CI environment.
- Restore the code’s dependencies/packages.
- Build the software.
- Extend the initial pipeline to include testing, and have this as a “gate” that prevents the run being successful if the tests fail.
- Extend the in pipeline to push the built artifacts to the chosen artifact repository.
- Use tools like Git or your IDE to create a new CI pipeline. The initial goal is to have a sucessful build process:
The CI is now ready for further configuration such as:
- Policy to run on code commits.
- Policy to ensure that the CI is successful before a PR can be merged.
- Layer in security scanners.
