Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Automating DevOps with GitLab CI/CD Pipelines

You're reading from   Automating DevOps with GitLab CI/CD Pipelines Build efficient CI/CD pipelines to verify, secure, and deploy your code using real-life examples

Arrow left icon
Product type Paperback
Published in Feb 2023
Publisher Packt
ISBN-13 9781803233000
Length 348 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Authors (3):
Arrow left icon
Chris Timberlake Chris Timberlake
Author Profile Icon Chris Timberlake
Chris Timberlake
Christopher Cowell Christopher Cowell
Author Profile Icon Christopher Cowell
Christopher Cowell
Nicholas Lotz Nicholas Lotz
Author Profile Icon Nicholas Lotz
Nicholas Lotz
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1 Getting Started with DevOps, Git, and GitLab
2. Chapter 1: Understanding Life Before DevOps FREE CHAPTER 3. Chapter 2: Practicing Basic Git Commands 4. Chapter 3: Understanding GitLab Components 5. Chapter 4: Understanding GitLab’s CI/CD Pipeline Structure 6. Part 2 Automating DevOps Stages with GitLab CI/CD Pipelines
7. Chapter 5: Installing and Configuring GitLab Runners 8. Chapter 6: Verifying Your Code 9. Chapter 7: Securing Your Code 10. Chapter 8: Packaging and Deploying Code 11. Part 3 Next Steps for Improving Your Applications with GitLab
12. Chapter 9: Enhancing the Speed and Maintainability of CI/CD Pipelines 13. Chapter 10: Extending the Reach of CI/CD Pipelines 14. Chapter 11: End-to-End Example 15. Chapter 12: Troubleshooting and the Road Ahead with GitLab 16. Index 17. Other Books You May Enjoy

Improving your pipeline

You’ve set up a pipeline to make sure your code is of high quality and doesn’t have security vulnerabilities. In many cases, you can stop there. However, for this sample use case, you’ll go a step further and look into using a DAG to speed up the pipeline. You’ll also see whether it’s worth splitting the pipeline’s configuration code into multiple files to improve readability and maintainability.

Using a DAG to speed up the pipeline

Our pipeline isn’t complicated enough to justify converting it into a DAG quite yet, but if we continue to add more jobs, we’ll eventually want to use DAGs for some or all of it for performance reasons. Let’s preview this by using the needs keyword now to add some DAG elements to our pipeline.

First, let’s say that we want the code_quality job to run only after the unit-tests job passes. After all, we might think that our code needs to work correctly before...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime