proomt

Search

Search posts, papers, and topics

All posts

CodeshipHannah Inman6 min readintermediate

Jenkins World Speaker Highlight: Extending your Pipeline with Shared Libraries, Global Functions and External Code

Summary

A practical walkthrough of Jenkins shared libraries: repository layout, global vs scoped loading, a simple Groovy var (gbuild) that wraps Gradle, and the steps to configure and use the library in a pipeline.

  • Shared libraries let you factor out reusable Groovy code for Jenkins Pipelines without writing a plugin.
  • Library repo must contain `vars/`, `src/`, and `resources/` directories; `vars` is the only place to expose functions to Declarative pipelines.
  • Define a global library in *Manage Jenkins → Configure System → Global Pipeline Libraries* and point it at a Git repo.
  • Load the library in a Jenkinsfile with `@Library('myLib') _` (underscore imports all vars).

Encapsulating build steps in shared libraries reduces duplication across many pipelines, enforces consistency, and enables declarative pipelines to run scripted logic safely. This is essential for scaling CI/CD in large orgs.

5/10

Related reading

  1. Copying Artifacts Between Builds in a Jenkins Workflow

    The copyartifact plugin now supports Jenkins Pipeline via a core step (v1.34). Use the generic `step([$class: 'CopyArtifact', …])` syntax to pull artifacts from another job, with all existing options available through the Snippet Generator. A native pipeline step is planned.

    Codeshipcloudbees.com1 min
  2. Best GitLab Alternatives for Enterprise Teams (2026)

    The article is a vendor‑authored marketing piece that lists criteria for picking a GitLab alternative and then promotes CloudBees Unify as a cross‑tool governance layer, with brief mentions of other tools (GitHub, Jenkins, Azure DevOps, Harness, CircleCI). It contains a few quoted survey percentages but no technical deep‑dive, code, architecture diagrams, or independent evaluation.

    Codeshipcloudbees.com10 min
  3. Jenkins Configuration as Code: Documentation

    Jenkins Configuration as Code (JCasC) lets you define the Jenkins controller via declarative YAML that mirrors the UI model. The plugin can generate exhaustive documentation and a JSON schema for the YAML, enabling IDE assistance. It also offers a REST API to dry‑run configs before applying them. The post links to related series entries and community resources.

    Codeshipcloudbees.com2 min
  4. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min
  5. Beyond jj: config & tools ecosystem

    A talk‑style overview of the growing jj ecosystem, covering new built‑ins (bookmark‑advance, bisect‑run, run, fix, tag, arrange, converge), clever alias tricks (subcommand aliases, git‑push‑like publish alias), the community‑maintained alias directory, and current forge integrations (GitHub stacked PRs, JJHub, Radicle, Tangled).

    Lobstersarko.net16 mintalklobste.rs89