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...