Jenkins multibranch "Jenkinsfile not found" / no Jenkinsfile in CI
By Kaveh Alemi·Latchkey
A multibranch or "Pipeline script from SCM" job reads the pipeline from a file in the repository. If that file is missing at the configured Script Path on a branch, Jenkins reports the Jenkinsfile as not found and does not build the branch.
What this error means
A branch is skipped in a multibranch scan with Jenkinsfile not found, or a Pipeline-from-SCM build fails because the script path does not resolve.
Jenkins console
Checking out git repo ...
Obtained Jenkinsfile from <sha>
ERROR: /home/jenkins/workspace/app@script: Jenkinsfile not found
Finished: NOT_BUILT
Diagnose it: agent, workspace, or sandbox?
Declarative pipeline failures usually come from the environment rather than the script: no matching agent, a dirty reused workspace, or the Groovy sandbox rejecting a method.
Jenkinsfile
// print what the agent actually is
sh 'hostname && whoami && pwd && java -version'
sh 'env | sort | head -40'
// workspaces are REUSED between builds by default
cleanWs()
Common causes
The Script Path is wrong or the file is absent
The job's Script Path (default Jenkinsfile) does not match where the file lives, or the branch genuinely has no Jenkinsfile.
The file exists only on some branches
In multibranch jobs, branches without a Jenkinsfile at the configured path are intentionally not built.
How to fix it
Align the Script Path with the repo
Confirm the file path in the repository for the affected branch.
Set the job's "Script Path" to that exact path (for example ci/Jenkinsfile).
Add the Jenkinsfile to branches that should build, or accept that branches without it are skipped.
Add the Jenkinsfile to long-lived branches that must be built.
Document that branches without the script are intentionally skipped.
Frequently asked questions
What causes Jenkins multibranch "Jenkinsfile not found" / no jenkinsfile in CI?
There are 2 common causes: the script path is wrong or the file is absent and the file exists only on some branches. The job's Script Path (default Jenkinsfile) does not match where the file lives, or the branch genuinely has no Jenkinsfile.
How do I fix Jenkins multibranch "Jenkinsfile not found" / no jenkinsfile in CI?
Align the Script Path with the repo. Confirm the file path in the repository for the affected branch.
What does Jenkins multibranch "Jenkinsfile not found" / no jenkinsfile in CI actually mean?
A branch is skipped in a multibranch scan with Jenkinsfile not found, or a Pipeline-from-SCM build fails because the script path does not resolve.
How do I stop Jenkins multibranch "Jenkinsfile not found" / no jenkinsfile in CI happening again?
Keep a consistent Script Path across branches. The prevention section lists 3 changes that keep it from recurring.