Interview Prep/Jenkins/Jenkinsfile syntax, Groovy & CPS errors

`ERROR: Unable to find Jenkinsfile` / `Lightweight checkout support not available, falling back to full checkout.` followed by a failure

BeginnerTroubleshootingJenkinsfile syntax, Groovy & CPS errors
Answer

Likely causes → The configured Script Path does not match the file location or case (jenkinsfile vs Jenkinsfile), or the branch spec contains variables.

Diagnose → Check job config Script Path and git ls-files | grep -i jenkinsfile on the branch.

Fix → Correct the path/case; use a literal branch spec or multibranch.

Prevent → Standard Jenkinsfile at repo root, or a documented path per monorepo service.

All Jenkins questions Roadmap: Jenkins

More on Jenkinsfile syntax, Groovy & CPS errors