Embracing Development Best Practices: CI/CD at Cloudwharf

Marco Zander

5 min read

In this blog post, we will discuss what CI/CD (Continuous Integration and Continuous Deployment) is and how it helps us in our commitment to excellence. Moreover, we will use examples from our development process for apps for the Salesforce AppExchange.

We always strive to provide our customers with the best solutions that their business requires, thereby building trust in our company as a team of high-tech product developers.

Dr.-Ing. Konstantin Teplinskiy CEO & FOUNDER

And as an extra bonus, you’ll discover how Continuous Integration relates to the panicking feeling when you realize you’ve lost your keys 😱🔓 – and the relief you feel when you remember that you heard that *clink* … still in your friend’s garden.

Table of Contents

What is CI/CD?

First, the technical version: CI/CD stands for Continuous Integration (CI) and Continuous Deployment (CD). It is a set of practices aimed at automating and optimizing the software development and delivery process.

Difference Between CI and CD

While CI and CD are often mentioned together, there are significant differences:

CI (Continuous Integration)

Continuous Integration focuses on integrating code changes and performing automated tests. The primary goal is to detect and resolve integration issues early. Instead of having a few big integrations of large changes (see Big Bang Integration below), CI involves continuously integrating small changes into the software. This makes it much easier to identify and fix problems that inevitably occur during software development.

A Metaphor: CI as Knowing Where You Lost Your Keys: Imagine you’re returning home after a delightful visit with a friend. As you reach your door, you realize your keys are missing. 😱😰 Panic sets in, but then you recall hearing a distinct clinking sound just after you left your friend’s place. Relief washes over you because now, instead of retracing every step from their house to yours, you know exactly where to search – right in front of their home. Similarly, by integrating smaller code changes continuously, CI helps you quickly pinpoint and resolve issues, saving time and reducing frustration.

CI vs. Big Bang Integration – Why Continuous Integration?

Another way to understand what CI is about is comparing it to Big Bang Integration.

While big bang integration with one big change usually leads to inefficiencies, continuous integration with small code commits helps to discover errors.

Big Bang Integration: When you work on the different parts of a complex system, such as software, individually and then try to bring them back together days, weeks, or even months later, this is also known as big bang integration. It usually doesn’t work well and leads to extreme inefficiencies.

Continuous Integration: CI tries to prevent exactly that. A function is implemented, tested, and integrated into a running system as quickly as possible. Development progress is therefore continuously integrated.

A Salesforce-Specific Example: To illustrate, consider a common scenario in Salesforce development: imagine you’ve added a new field to a page layout. During CI, this change is continuously integrated into the shared codebase. However, if you forget to retrieve this field during deployment but still include the layout, CI tools will flag this discrepancy, alerting you to the missing field. This is a simple yet powerful example of how CI ensures that small, incremental changes are correctly integrated, minimizing the risk of errors during later stages.

Why Do Errors Still Occur After CI?

Despite thorough testing during CI, some errors might still occur. These errors can stem from:

  • Environment differences: For example, a feature might work in the development environment but fail in staging or production due to configuration differences.
  • Edge cases not covered in tests: Automated tests may miss certain edge cases, leading to issues when the code is used in real-world scenarios.
  • Integration complexities that only surface under real-world conditions: This is particularly common in environments where multiple systems or third-party APIs interact.

For us, the most common issues stem from API changes made by third parties, though Salesforce updates can occasionally cause problems as well, although this is quite rare.

Leveraging Past Errors: To continuously improve our CI pipeline, we make a concerted effort to integrate errors that weren’t caught during initial automated testing into our future tests. We review and enhance our CI pipeline every six months to ensure it remains robust and effective.

While CI helps catch most issues early, it doesn’t guarantee a flawless product, particularly since it only covers everything up to the pre-deployment testing phase (meaning the software hasn’t yet reached the customer). This is where Continuous Deployment comes into play.

CD (Continuous Deployment)

Continuous Deployment focuses on automatically deploying the code to the production environment. The principle is the same as it was for CI: instead of having one big deployment, you try to make the deployment process more continuous. The primary goal is to ensure the code is always ready to go live.

CI/CD pipelines help to understand the differences between CI and CD.

What are CI/CD Pipelines?

code commit, automated testing, build, deployment (to sandbox/production environments) and then monitoring are the phases of the CI/CD pipeline.
adapted and simplified version based on Broy, M., & Kuhrmann, M. (2021) and Kneuper, R. (2018)

A CI/CD pipeline is an automated series of steps performed to move software from development to production. This pipeline typically includes:

  1. Code Commit: Developers submit code to a version control system.
  2. Automated Tests: The code is automatically tested to ensure it functions correctly.
  3. Build: The code is compiled and packaged into an executable format.
  4. Deployment: The code is deployed to the production environment.
  5. Monitoring: After deployment, the application is monitored to ensure it operates as expected.

CI/CD pipelines at Cloudwharf: In our CI/CD pipeline, we follow a structured approach: all development is initially done in a development sandbox. Once the code is validated here, it is moved to the stage sandbox for further validation in an environment that closely resembles production. Here, both our team and our customers can check if everything works as expected. Finally, after passing these checks, the code is deployed to the production environment. This ensures that potential issues are identified and resolved at the earliest possible stage, minimizing the risk of problems in the live environment.

Why is CI/CD Important?

CI/CD is crucial for several reasons:

  • Faster Time-to-Market: With CI/CD, you can deploy new features and updates faster, giving you a competitive advantage.
  • Higher Quality: Automated testing and continuous integration catch errors early, improving the quality of your software.
  • Efficiency: CI/CD automates many manual processes, increasing efficiency and shortening development cycles.
  • Continuous Improvement: Regular deployments allow for continuous feedback from users, enabling ongoing improvements to your products.

Benefits of CI/CD for a Company

Implementing CI/CD offers numerous benefits:

  • Reduced Risks: Continuous testing and deployments catch errors early and fix them promptly.
  • Higher Reliability: Automated processes reduce human error and increase the reliability of software.
  • Faster Recovery: In case of an issue, the code can be quickly rolled back or updated, minimizing downtime.
  • Better Collaboration: CI/CD fosters better collaboration and communication between teams, as everyone works on the same baseline.

How Cloudwharf Uses CI/CD and Benefits From It

At Cloudwharf, we have integrated CI/CD into our development process. Here are some specific benefits we experience:

  • Automation of Routine Tasks: Our developers can focus on writing code while the CI/CD pipeline handles testing and deployments automatically. This frees up time for the more experienced developers by eliminating checks that can be automated.
  • Check yourself: Our team-lead Sergey says that one of the key benefits is, too, that developers are able to check their code themselves.
  • Faster Delivery: New features and updates are deployed in the shortest time possible, helping us respond quickly to our customers’ needs.
  • High Quality: Continuous testing ensures our software is always of the highest quality, meeting and exceeding our customers’ expectations.
  • More Efficient Project Management: CI/CD allows us to manage and execute projects more efficiently, leading to happier customers and better business outcomes.

By implementing CI/CD at Cloudwharf, we have increased our efficiency, improved the quality of our products, and made our customers more satisfied. We are confident that CI/CD can also be highly beneficial for your firm to optimize project execution and improve team communication. If you’re looking to implement CI/CD at your company, our team lead, Sergey, offers this advice:

Start by integrating the most essential checks into your pipeline, even if you’ve never used CI/CD before. Gradually build upon these basics by incrementally increasing the scope and coverage of your tests over time.

Sergey Potapov Salesforce Platform Developer & Team-Lead

You want to work with us and benefit from continuous integration and deployment?

Contact us today!

Additional Resources and References

  • Kneuper, R. (2018). Software processes and life cycle models. Springer.
  • Broy, M., & Kuhrmann, M. (2021). Einführung in die Softwaretechnik. Springer.
  • Pittet, S. Continuous integration vs. delivery vs. deployment. Atlassian, https://www.atlassian.com/continuous-delivery/ci-vs-ci-vs-cd, as of: 2024, July 25.
Share:

You might also like

Automate Your Company
with Us

We look forward to hearing from you and will usually reply within one business day!