DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. DevOps and CI/CD
  4. The Fundamental Methods Necessary for CD/CI Success

The Fundamental Methods Necessary for CD/CI Success

If you're looking to get started with a CI/CD pipeline, you need to have some fundamentals down. This post will help get you there.

Ben Putano user avatar by
Ben Putano
·
Feb. 19, 18 · Analysis
Like (4)
Save
Tweet
Share
13.16K Views

Join the DZone community and get the full member experience.

Join For Free

Providing your users with the best possible software is always the number one priority. But doing so in the fast-paced, ever-changing technology landscape we live in isn’t a simple task. As soon as an update is deployed, it seems like the need for the next is already here. This has been a constant battle of development teams for decades. The introduction of DevOps was a great start, the need to become even more efficient still remains.

Enter: continuous delivery (CD), which is the process of ensuring your software is always ready for deployment. It goes hand-in-hand with the DevOps and agile movement. Deployments are available with the push of a button, and rollbacks (when necessary) are seamless.

Achieving continuous delivery bliss is the dream, but how do we get there? Just follow these commandments:

  • Establish continuous integration
  • Test
  • Test some more
  • Deploy when ready
  • Monitor

Before embarking on the CD journey, it’s important to reflect on the state of your team. Make sure all the pieces are in place and you feel confident that you’re ready for continuous delivery. Rome wasn’t built in a day, and neither was the CD dream team.

Setting the Continuous Integration Foundation

Behind every great CD pipeline is a well-oiled continuous integration (CI) pipeline. CI is the process of developers pushing code early and often into a code repository for automated integration testing. The idea is that every piece of code sent to the repository will be tested within minutes and flagged if any errors occur. If an error does occur, that now becomes the main priority of the developer.

Without continuous integration, back-tracking errors can be a tedious and time-consuming process, and it’s easy to get lost in the maze of code changes. Integrating as early and often as possible makes it easier to identify where the error occurs. CI also reduces the risk of having errors flare up further down the CD pipeline.

While the specific CI process can vary slightly based on a team’s preference, the essential steps are:

  1. Build code
  2. Send code to repository
  3. Test code
  4. Send back errors
  5. Fix code
  6. Repeat step 2 and 3

The key to an effective CI process is the automation of steps 1-4.Having a reliable CI tool (or tools) makes this possible. If the CI process is running correctly, there shouldn’t be enough time in the day for a team member to test each piece of code sent to the repository.

For a more in-depth look into continuous integration specifically, take a look at this ThoughtWorks article or this Atlassian article.

Test, Test, and Test Again

Once cleared through the code repository tests, the next step is to send your code to more expansive staging and production tests. Once again, the key here is automation. For an effective CD pipeline, little to no effort should be going into these tests, allowing your team to focus on development in the CI stage. The tests performed through the stage typically include regression tests (making sure the application works) and performance tests (making sure the application works efficiently).

These tests should confirm that your application works as it should and integrates properly with your existing platform. In many cases, teams will have small user groups test deployments in production-like environments. This gives your team explicit feedback from customers.

To Deploy, or Not to Deploy

This is where continuous delivery and continuous deployment fundamentally disagree. In a standard continuous delivery pipeline, once your application is cleared through testing and declared ready for deployment, it sits in a deployment queue. It is not deployed until manually done so. On the contrary, in a continuous deployment pipeline, as soon as an application passes through testing, it is automatically deployed to end-users.

As ThoughtWorks puts it, “The decision to deploy is a business decision, not a technical restraint”. Deployment frequency varies business to business. What makes sense for a social network probably isn’t going to be the same for downloadable software, such as Adobe Creative Suite or Jenkins. Imagine having to download new software every day… the horror.

Monitor, Monitor, and Monitor Again

Just as DevOps doesn’t end for developers after the code is written, continuous delivery doesn’t end once an application is deployed. Inevitably some applications will have errors, despite all of the testing you worked so hard to automate. This is completely normal. Catching the errors early is critical to the well-being of your application and to the user experience.

Yes, automation is still king. Incorporating tools to monitor deployments and trigger errors can help your team focus on the earlier stages of the CD pipeline. Retrace is one monitoring tool, among many, to keep track of deployments and how they impact your application.

The Continuous Delivery Pipeline Is Not Set in Stone

Every DevOps team is different and every CD pipeline will be different. Some teams choose to test heavily to ensure quick and responsive log times, while others may choose to focus more of their efforts on security and reliability. Whatever is most important to your team and your application should be your number one priority throughout CD.

Committing to continuous delivery is daunting, and we get it. But once you’ve got the ball rolling and keep up with deployment best practices, the possibilities are endless. Your team– and most importantly, your users– will thank you.

Continuous Integration/Deployment integration test agile application Pipeline (software) Contextual design Delivery (commerce)

Published at DZone with permission of Ben Putano, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Real-Time Stream Processing With Hazelcast and StreamNative
  • Kubernetes vs Docker: Differences Explained
  • Fraud Detection With Apache Kafka, KSQL, and Apache Flink
  • Differences Between Site Reliability Engineer vs. Software Engineer vs. Cloud Engineer vs. DevOps Engineer

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: