pipeline as code – TechTarget

Posted under Programming, Technology On By James Steward

Pipeline as code is an approach to a continuous integration (CI) pipeline where the pipeline is expressed entirely in computer code. The entire pipeline, stored in version control, is expressed as a single script or program that can run with a single command-line execution. This may be best understood in contrast to traditional CI, which is configured through a user interface (UI), along with other as-code concepts.
Computers automate straightforward, repeatable business processes. From processing insurance claims to monthly banking statements, computer programs take things in one state and create a new state. Virtual servers, Docker and cloud technology made it possible to create entire environments from the command line. Wrapping those in code provides logging, unit testing, and the possibility to handle exceptions and errors. That gave rise to infrastructure as code. Software-defined networking brought the same concept to the configuration of routers and the internal company network.
It makes sense to have the computer do the hard, repeatable work if the subject is a repeatable business process, but it is complex enough to have possibilities such as failure that require inspection, logging and notification. Instead of working with a UI to do the same steps over and over again, one could write a computer program, with libraries and configuration files, to do the subject-matter expertise, such as building infrastructure, defining network rules, running tests or running CI.
Under traditional CI, deployment pipelines are configured through the UI. First, the build designer provides the software a source repository to check out the latest code from. Then, the designer clicks to add steps, giving each a label, such as build or test. This also tells the CI system how to recognize failure, who to notify and if that failure should stop the system from continuing.
With pipeline as code, the entire build pipeline is expressed in one configuration file or even computer program. Instead of setting things up through the front end, cutting and pasting — or hand typing — code to run at each stage, all of that is expressed in code.
Pipeline as code combines the ability of CI for logging, reporting, dashboards, trends, visualizations and notifications with the benefits of “as code,” version control and programming. This aligns with the concept of DevOps by bringing modern programming rigor into the operations process.
Having the code under version control makes rollback and auditing simple. It’s clear as to exactly who made what change and when they made that change. If a change to the pipeline causes problems, the person who made that change can get an alert, along with a link to that specific change. Pipelines developed as code have all the benefits of traditional source code, including looping structures, variables and access to code libraries, along with the ability to use object-oriented constructs, such as inheritance and encapsulation.
With pipeline as code as a computer program, it can become complex and difficult to debug. In general, the common practice is to try to keep pipeline code as simple as possible.
A second drawback with pipelines is that they lack the visualization component. Once defined, one cannot drag, drop or move them around. Modern UIs and plugs do exist to define the pipeline in a visualization and then export that as code to execute. Running the code and interpreting it in that visualization solves the problems of creation, debugging and transparency, all while still having a real pipeline as code.
Explore the latest news, product releases and technology updates, as well as analysis and expert advice from AWS re:Invent 2022 …
Nutanix revenues jumped 15% thanks to more users renewing their subscriptions. The company also reported positive quarterly …
Secrets require a certain level of upkeep such as storage, delivery and management. Compare services in these criteria and learn …
While it’s not necessarily easy to become certified in microservices architecture, there are plenty of courses you can take to …
The Golden Hammer antipattern can sneak up on a development team, but there are ways to spot it. Learn the signs, as well as some…
Developers face numerous struggles trying to perform traditional, end-to-end integration testing on microservices. Contract …
Achieving full-stack observability remains fraught with challenges, but it’s a necessary move for enterprises running complex …
Maps are a popular data structure in many programming contexts thanks to their efficiency and speed. But, in Go, some unique …
Adopting DevOps can be challenging, especially when communicating across IT and business teams. The five elements of the CALMS …
Do you know Java? Are you trying to learn TypeScript? Here are five differences between TypeScript and Java that will make the …
The job a product manager does for a company is quite different from the role of product owner on a Scrum team. Learn key …
Want to prove your knowledge of Scrum? Tackle this 10-question Scrum introduction quiz and see how well you know the Scrum …
Many organizations struggle to manage their vast collection of AWS accounts, but Control Tower can help. The service automates …
There are several important variables within the Amazon EKS pricing model. Dig into the numbers to ensure you deploy the service …
AWS users face a choice when deploying Kubernetes: run it themselves on EC2 or let Amazon do the heavy lifting with EKS. See …
All Rights Reserved, Copyright 2006 – 2022, TechTarget

Privacy Policy
Cookie Preferences
Do Not Sell My Personal Info

source

Note that any programming tips and code writing requires some knowledge of computer programming. Please, be careful if you do not know what you are doing…

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.