Skip to main content

The benefits of declarative pipelines

Pipelines are an important part of the Jenkins ecosystem for CI/CD, and one important iteration of the pipeline concept is called the declarative pipeline. SD Times, in partnership with CloudBees, recently hosted a webinar called “Modernize Your Pipelines with Best Practices Built-In,” to talk about the benefits of these. 

But to understand why CloudBees, which is an enterprise sponsor of Jenkins, is pushing for people to use declarative pipelines, we have to go back and take a look at the history of pipelines in Jenkins. 

Darin Pope, developer advocate at CloudBees, explained that the first iteration of a pipeline was essentially just chaining together freestyle jobs, which are sequential tasks that the developer can define.  

According to Pope, some of the downsides of freestyle jobs are that they are not auditable without installing extra plugins and you are bound to the Jenkins UI, which doesn’t allow for building some of the more complex workflow features, such as flow control, running steps on multiple agents, or running steps in parallel. 

Around 2015 or 2016, Pope recalled, Jenkins 2 was released, and it introduced a new syntax called the scripted pipeline. But developers could end up doing bad things when writing these pipelines and there wasn’t much to stop them from doing that. 

Declarative pipelines were then introduced to put some guardrails in place for developers so that they wouldn’t do those bad things to their projects. 

“Me as a developer, on Joe Schmoe’s team running an e-commerce shop, I simply can’t go in anymore and modify that pipeline via the UI,” said Ian Kurtz, solution architect at CloudBees. “Nope, I have to open a PR, right? So it almost enables the best practices that you see, these days, as far as using pipelines.”

Declarative pipelines use the same execution engine as scripted pipelines, but they add a number of new benefits. They are easier to learn, have richer syntax, provide syntax checking, and are easily restartable using the “Restart from stage” functionality. 

Allowing the pipeline to restart from a particular stage ensures that there’s not as much time lost when something goes wrong on these long builds. 

“I’ve worked with customers where they have infrastructure issues that are intermittent, you know, maybe they have networking problems, or an NFS drive that’s flaky. And that fails at the end of a six-hour pipeline or a two-hour pipeline, and it’s just one stage. So you can just rerun that stage if you’re using declarative,” Ray Kivisto explained. 

Kurtz added: “A lot of people with us today have seen the direct business impact of the failure of long running pipelines, right? It impacts your release cycle, impacts your build times, and it just negatively impacts your software delivery process as a whole.”

To hear the speakers expand on those benefits with real-world examples, and for best practices for creating pipelines in Jenkins, watch the webinar recording

The post The benefits of declarative pipelines appeared first on SD Times.



from SD Times https://ift.tt/gpTFeG0

Comments

Popular posts from this blog

Difference between Web Designer and Web Developer Neeraj Mishra The Crazy Programmer

Have you ever wondered about the distinctions between web developers’ and web designers’ duties and obligations? You’re not alone! Many people have trouble distinguishing between these two. Although they collaborate to publish new websites on the internet, web developers and web designers play very different roles. To put these job possibilities into perspective, consider the construction of a house. To create a vision for the house, including the visual components, the space planning and layout, the materials, and the overall appearance and sense of the space, you need an architect. That said, to translate an idea into a building, you need construction professionals to take those architectural drawings and put them into practice. Image Source In a similar vein, web development and design work together to create websites. Let’s examine the major responsibilities and distinctions between web developers and web designers. Let’s get going, shall we? What Does a Web Designer Do?

A guide to data integration tools

CData Software is a leader in data access and connectivity solutions. It specializes in the development of data drivers and data access technologies for real-time access to online or on-premise applications, databases and web APIs. The company is focused on bringing data connectivity capabilities natively into tools organizations already use. It also features ETL/ELT solutions, enterprise connectors, and data visualization. Matillion ’s data transformation software empowers customers to extract data from a wide number of sources, load it into their chosen cloud data warehouse (CDW) and transform that data from its siloed source state, into analytics-ready insights – prepared for advanced analytics, machine learning, and artificial intelligence use cases. Only Matillion is purpose-built for Snowflake, Amazon Redshift, Google BigQuery, and Microsoft Azure, enabling businesses to achieve new levels of simplicity, speed, scale, and savings. Trusted by companies of all sizes to meet

2022: The year of hybrid work

Remote work was once considered a luxury to many, but in 2020, it became a necessity for a large portion of the workforce, as the scary and unknown COVID-19 virus sickened and even took the lives of so many people around the world.  Some workers were able to thrive in a remote setting, while others felt isolated and struggled to keep up a balance between their work and home lives. Last year saw the availability of life-saving vaccines, so companies were able to start having the conversation about what to do next. Should they keep everyone remote? Should they go back to working in the office full time? Or should they do something in between? Enter hybrid work, which offers a mix of the two. A Fall 2021 study conducted by Google revealed that over 75% of survey respondents expect hybrid work to become a standard practice within their organization within the next three years.  Thus, two years after the world abruptly shifted to widespread adoption of remote work, we are declaring 20