No such DSL method CI/CD Origin: Build & delivery Last updated 25 Oct 2026

Jenkins: java.lang.NoSuchMethodError: No such DSL method 'dockerBuild' found among steps

The Jenkinsfile calls a step that does not exist — the plugin is not installed, or the name or argument is wrong.

Exact message you may see No such DSL method found among stepsjava.lang.NoSuchMethodError: No such DSL methodNo such DSL method 'dockerBuild' found among stepsWorkflowScript: No such DSL method
Seen on: Jenkins

Meaning

Steps come from plugins or shared libraries. Check the Pipeline Syntax snippet generator (/pipeline-syntax) to see which steps exist on your controller. A missing step usually means a plugin is missing or disabled, a shared library was not loaded with @Library, or the step name is misspelled.

Common causes

  • Plugin that provides the step is not installed/enabled
  • Shared library not imported (@Library('x') _)
  • Typo or wrong case in the step name
  • Step used inside the wrong block (e.g. steps vs script)
  • Library version/branch does not contain the step

⚡ Quick fix

  1. Check /pipeline-syntax for the step
  2. Install the plugin or add @Library('name@version') _
  3. Fix the spelling and parameter names

Detailed fix by platform

Jenkins

  1. Add at top of file: @Library('shared-lib@main') _

Code examples

Import the library first

groovy
@Library('shared-lib@main') _
pipeline {
  agent any
  stages { stage('Build') { steps { dockerBuild image: 'app' } } }
}

How to diagnose

  1. Step — Which step is missing?
  2. Plugin — Installed?
  3. Library — Loaded?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

ComparisonError: manifest generation failed — Argo CD: ComparisonError: rpc error: code = Unknown desc = Manifest generation error (cached): kustomize build failed (CI/CD)ComparisonError: mani…Could not find credentials entry — Jenkins: ERROR: Could not find credentials entry with ID 'github-token' (CI/CD)Could not find creden…permission denied /var/run/docker.sock — Jenkins: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock (CI/CD)permission denied /va…Scripts not permitted to use method — Jenkins: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method java.lang.String toUpperCase (CI/CD)Scripts not permitted…Template file not found — Azure Pipelines: /azure-pipelines.yml: File /templates/build.yml not found in repository / Unable to find template (CI/CD)Template file not fou…Waiting for next available executor — Jenkins: Still waiting to schedule task — Waiting for next available executor / 'agent1' is offline (CI/CD)Waiting for next avai…WorkflowScript compilation error — Jenkins: WorkflowScript: 12: unexpected token: } @ line 12, column 5. 1 error (CI/CD)WorkflowScript compil…No such D…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.