Ebook_transform_your_CI-CD_pipeline
Ebook_transform_your_CI-CD_pipeline
Transform your
CI/CD Pipeline
Common pitfalls and how to avoid them
Transform your CI/CD Pipeline
Common pitfalls and how to avoid them
Contents
Introduction
A framework to facilitate DevOps 3
Part One
What is CI/CD’s role within DevOps? 4
How does CI/CD work? 5
Part Two
People 9
Part Three
Technology 12
Part Four
Processes 17
Conclusion
Automate, automate, and automate some more 21
2
Introduction
A framework to facilitate
DevOps
In this ebook, we’ll take a closer look at CI/CD and its significant
role within DevOps. We’ll explore best practice in relation to people,
technology, and processes; highlight the changes you might need
to implement and the reasons behind them; and take a look at
some of the common pitfalls you’ll want to avoid as part of your
own transformation.
3
Part One
4
How does CI/CD work?
CI/CD thinking and practices are supported by tools that enable
automation and regular and rigorous testing at each stage of the
software pipeline. This reduces the time required to integrate changes
before moving code into production. It depends on closed feedback
loops to identify and fix problems fast. This notion of making ongoing
improvements – small changes more frequently – makes testing more
manageable and integration less problematic.
5
The key stages of a CI/CD pipeline
Test: automated tests are run to validate the code and how the
product behaves. These tests might be run in multiple stages, and
provide feedback to the developers.
Deploy: when code has passed the tests, it’s ready to be deployed into
a new environment, either manually into a staging environment first or
automatically into a production environment for the customers.
Any failures will trigger notifications to let the relevant developer know
the cause, and when code is successfully deployed to production, the
whole team is made aware too.
6
Continuous delivery or continuous deployment?
The CD in CI/CD is sometimes mistakenly referred to as continuous
deployment. Just to clarify, continuous delivery refers to the discipline
of building software in a way that means it can be deployed to
production at any time. Continuous deployment, on the other hand,
refers to every change being automatically put into production, so
multiple deployments every day. In order to achieve continuous
deployment, you must be doing continuous delivery.
Create code that makes you money – rather than sitting in a queue
waiting for manual testing, your code gets tested automatically and
deployed to production. That means you can start making money
from it right away.
7
More innovative, more competitive – getting features to market fast
helps you stand out from the competition and set the agenda for your
sector, driving innovation internally.
Hire the best and keep them too – engineers want to focus on their
speciality, and with CI/CD they can experience greater productivity,
autonomy, and work on more enjoyable tasks. Word will get around,
and you’ll soon be attracting the best talent.
8
Part Two
People
While CI/CD heavily impacts the way IT works, it has wider cultural
implications on the business at large. It depends on a completely
different approach to how and when value is delivered to the customer.
Teams practising CI/CD will detect errors earlier in the development
process, reduce integration problems, and develop faster and with
more confidence. As a result, they’ll feel more productive and happier
at work. This uptick will ensure you retain the best people and attract
new bright sparks to the business.
The most obvious and important change that you’ll need to make is
ensuring collaboration and communication among teams takes
precedence and that the right technology and practices are in place to
facilitate this. For CI/CD to be successful, people from different parts
of the business will need to be comfortable teaming up and sharing
knowledge. It’s all about working towards a common goal and
achieving more together.
9
People pitfalls and how to avoid them
Prioritising technical expertise over soft skills
People skills are very important in a DevOps team. Developers aren’t
confined to working in silos on individual projects – they’re part of a
wider group of individuals that need to communicate clearly for speedy
CI/CD to take place. They should also have a customer-first mindset to
help empathise with the end user’s needs and deliver accordingly.
Managers tasked with putting together a DevOps team should include
a mix of process, functional, technical, and soft skills to find the
right balance.
10
Scrimping on security knowledge
Because CI/CD lets you develop and deliver new features faster, it
opens your software up to the risk of vulnerabilities. Rather than seeing
safety as an afterthought, embrace a shift-left approach, fixing security
issues early and often with quality testing. This includes incorporating
role-based access control and leveraging secrets management to
ensure sensitive information is properly protected. Your teams will
need a solid understanding of best practice for building secure
software to keep data safe and minimise the threat of cyber attacks.
11
Part Three
Technology
Another key consideration is what you can afford. While many tools are
open source – giving you access to a thriving community to solve
problems – you’ll need to factor in support costs and hosting services.
Paid software can bring its own advantages, such as expertise for your
configuration at your fingertips. You should consider which tools will
help you produce better quality code, reduce vulnerabilities, and
increase operational efficiency.
12
Tools fit for four key phases
There are some key phases to any CI/CD pipeline, namely source, build,
test, and deploy, and you’ll need tools to support each. While we’re not
recommending any specific tools in this ebook, here are a few factors
to consider for each phase:
Build – this is when the source code and its dependencies are
combined to build a runnable instance. Here container software can be
used in cloud-native environments. When done right, it allows you to
speed up building, testing, and deploying software, features, and
functionality. And it lets you do all this more easily and frequently
without disrupting the user experience.
Test – automated tests validate the code and bring any issues to light.
Larger projects require lots of testing of different types at several
stages. Tools that can automatically build, document, integrate, test,
facilitate required changes, and prepare an application for deployment
help keep this phase on track.
13
Technology pitfalls and how to avoid them
Not considering customisation needs
How much customisation are you able (or willing) to do on your own?
What you decide will have an impact on costs, as well as how long it
will take to implement your new tools. You’ll also have to consider the
resources you need going forward in-house or whether you’ll pursue
other avenues, such as consultants, which could be pricey. Knowing
what you can afford will play into what you choose, but don’t overlook
the importance of tailored tools. You need technology that works for
your organisation, and customisation is a part of this.
14
Being unable to put the work in to use a tool
Signing up for something and actually incorporating it into your pipeline
are two separate things. It’s easy to get excited about the potential
benefits of a tool without considering the work involved in getting
everyone to use it. Just because something requires effort and change,
it doesn’t mean it’s not worth doing, but make sure you’re aware of the
challenges ahead so you can plan for implementation.
15
Sidelining security tools
Don’t forget about security – you need to account for tools that allow
faster issue identification, notification, and better visibility so you have
a clear idea of the risks and vulnerabilities at each stage of the pipeline.
But an overly complex toolchain could weaken security. You might need
to pay more for tools with additional security functionality, but these,
combined with an efficient CI/CD process, will ensure data is safe, risk
is low, and there is efficient issue resolution when problems do arise.
16
Part Four
Processes
With your people prepared and tools in place, it’s time to turn your
attention to the processes that facilitate a fast workflow with CI/CD.
Keep in mind that your processes should work with your people to
help them deliver value to customers, rather than making lives more
difficult. With powerful processes, integration becomes a non-event
and new products and features can be rolled out right when customers
need them.
The first step is plan. The second step? Plan some more. CI/CD
processes require a healthy dose of up-front organisation. Lots of the
processes you’re going to implement will be automated. Relying on
automation can’t be rushed. You need to establish a solid framework
that’s tailored to your organisation and business needs. What that
definitely doesn’t look like is leaving teams to figure things out for
themselves, hoping the best processes will surface during execution.
Far from it.
Sure, things will change and need to be adjusted as you move from the
planning phase into execution. You’ll go from focusing on big-picture
considerations to sweating the small stuff, looking at the details and
improving where you can. It’s IT management’s job to hold everyone
accountable for sticking to the plan or to justify changing it.
17
Process pitfalls and how to avoid them
Planning for success
As with people and tools, establishing secure processes is vital to the
future of your pipeline. Rather than planning for a perfect world where
security isn’t a concern, you need to plan for failure, attacks, and other
risks. Include security teams in your process planning at the start.
Containerisation is one strategy that can help, allowing internal
application processes to be isolated from one another. Automating
testing is important and should be a priority alongside compliance
testing. Consider inserting security gates into the pipeline too. That
way human intervention can confirm all protocols have been followed
prior to release.
18
Not considering consistency
Getting to a place where you’re comfortable with your CI/CD pipeline
requires you to establish a consistent cadence of builds and
deployments, helping you understand the pace your teams work at.
You’ll want to have clear rules around what triggers an automated build
or deployment. Version control (a single source of truth for all teams
with artifacts in one repository) and issue tracking are vital here. Don’t
worry if what you plan for might not be what’s needed, just be prepared
to adjust with experience.
Being noncommittal
Early and often is the way to go when it comes to integrating code into
the main branch. Working this way will avoid maintenance nightmares
for your engineers. For work in progress, code can remain invisible to
the end user or tester. Progressive delivery processed, like feature flag
management, will help to navigate and minimise merge conflicts.
19
Only testing code
While it’s essential to test your deployment pipelines to the max,
mitigating defects and making improvements, don’t forget to put your
people to the test too. Part of quality management is making sure your
developers are checking into the trunk at least once a day, that every
check-in triggers an automated build and testing, and that if a build
breaks or a test fails, the problem can be solved in a few minutes.
20
Conclusion
Automate, automate,
and automate some more
At its most basic level, your CI/CD strategy should be based around
automation – processes that support automation and keep it in
check, tools that enable automation to thrive, and people with the
skills to plan and implement automation while focusing on more
important work. Anything that can be repeated, such as building,
testing, and deployment, is ripe for automation. And anything that’s
automated should benefit from human intervention where it’s
prudent to do so.
CI/CD thinking, technology, and processes are what will enable your
organisation to keep up with the fast-paced global economy.
They’ll set your software apart from competitors’, giving you an
advantage in a crowded marketplace. And they allow you to keep
evolving, improving the quality of your software for your customers.
Internally, your teams will also benefit from increased efficiency and
be able to channel their skills into so much more than mundane,
repetitive tasks.
21
At Adaptavist, our DevOps solutions help you stay ahead of the game.
With our strong and dedicated team of experts, we combine the right
mix of strategic-led consultancy and technology-led solutions that
place people, process, and tools at the heart of your business strategy.
Contact us
22
We help organisations transform to continuous change being their
business as usual. We do this by supplying technology, providing
advice, and delivering change through modern, iterative approaches to
development, deployment, and application lifecycle management.
Whether you want training for your team, to build a software platform
for your company, or to automate your existing tooling, we can help
you. If you want to unlock the full power of Atlassian and transform
your business at scale, get in touch with our team today.
adaptavist.com