Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Jenkins Shared Libraries: Sharing Pipeline Code with vars/ and src/
A Shared Library keeps repeated pipeline code in a separate repository as vars/ steps and src/ classes; pipelines load it pinned to a tag with @Library('lib@v1.2.0'). The dotnetCi and angularCi steps, a global library via JCasC, the risk of an unpinned main, real output of the difference between a trusted global library and a sandboxed folder library, a JenkinsPipelineUnit test, and when not to write a library.
Your First Pipeline with a Jenkinsfile: Declarative Syntax, stages, steps, post and environment
A Jenkinsfile describes the pipeline in the same repository as the code; in Declarative syntax agent, stages and steps form the skeleton, while environment, options, parameters, triggers and post define the behavior. Linter output, the quoting rule, the parameter the shell sees as empty on the first build, a stage skipped by when, Snippet Generator and Replay, Scripted Pipeline, and NotSerializableException with @NonCPS.