Menu

1 / 2

From scripted to declarative: what 10+ years of Jenkins pipelines taught me about shared libraries and quality gates

DEV Community: jenkins·Tayguara Reis·about 20 hours ago
#iwGXXLda
#devtojenkins#devto#dev#pipeline#library
Reading 0:00
15s threshold

I wrote my first Jenkins pipeline in 2016. Ten years later, the repository it started has more than 260 pipeline files: deploy jobs, end-to-end suites, a Selenium grid, health checks, scheduled maintenance. Most of them are scripted. A newer project, started in 2021, runs on six declarative pipelines and puts releases through a chain of quality gates before a blue-green deploy.

This is not a syntax tutorial; the Jenkins documentation covers syntax well. It is about the decisions behind those files: why I started scripted, what shared libraries fixed, how I order quality gates, how blue-green rollback fits in, and when an old scripted job is worth migrating. Some of those decisions I would make differently today, and I will say which.

The snippets below are simplified.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.