`groovy.lang.MissingPropertyException: No such property: IMAGE_TAG for class: groovy.lang.Binding`
BeginnerTroubleshootingJenkinsfile syntax, Groovy & CPS errors
Answer
Likely causes → A variable referenced in Groovy that was never defined, a def variable declared in another script {} block (local scope), or an env var accessed without env..
Diagnose → Find where IMAGE_TAG should be set; check whether it was a def inside a different block.
Fix → Set env.IMAGE_TAG = ... and read env.IMAGE_TAG, or declare the variable above the pipeline {} block.
Prevent → Prefer env. for cross-stage values; avoid relying on undeclared binding variables.
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