`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.
More on Jenkinsfile syntax, Groovy & CPS errors
`WorkflowScript: 1: Missing required section "agent" @ line 1, column 1.`Beginner`Unknown stage section "step". Starting with version 0.5, steps in a stage must be in a ‘steps’ block.`Beginner`java.lang.NoSuchMethodError: No such DSL method 'withSonarQubeEnv' found among steps [archive, bat, build, ...]`Beginner`java.io.NotSerializableException: java.util.regex.Matcher`Advanced`java.io.NotSerializableException: groovy.json.internal.LazyMap`Intermediate`org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object`Intermediate