We should catch undeclared variables in a PR before it is merged, to prevent issues like [this one](https://github.com/adoptium/ci-jenkins-pipelines/pull/1246). One option is to adjust the [linter](https://github.com/adoptium/ci-jenkins-pipelines/blob/master/.github/workflows/linter.yml) to throw an error if a variable is undeclared.