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.
No such DSL method found among stepsjava.lang.NoSuchMethodError: No such DSL methodNo such DSL method 'dockerBuild' found among stepsWorkflowScript: No such DSL method 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.
stepsvs script) - Library version/branch does not contain the step
⚡ Quick fix
- Check /pipeline-syntax for the step
- Install the plugin or add
@Library('name@version') _ - Fix the spelling and parameter names
Detailed fix by platform
Jenkins
- Add at top of file:
@Library('shared-lib@main') _
Code examples
Import the library first
@Library('shared-lib@main') _
pipeline {
agent any
stages { stage('Build') { steps { dockerBuild image: 'app' } } }
}How to diagnose
- Step — Which step is missing?
- Plugin — Installed?
- 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:
Similar errors
- ComparisonError: manifest generation failed Argo CD: ComparisonError: rpc error: code = Unknown desc = Manifest generation error (cached): kustomize build failed
- Could not find credentials entry Jenkins: ERROR: Could not find credentials entry with ID 'github-token'
- 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
Most viewed in CI/CD
- The process '/usr/bin/git' failed with exit code 128 GitHub Actions: Error: The process '/usr/bin/git' failed with exit code 128
- This job is stuck because you don't have any active runners GitLab CI: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them
- Resource not accessible by integration GitHub Actions: Error: Resource not accessible by integration (403)
Other ways to find it
Where this error sits
Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 25 Oct 2026