We should use the 'build' script in Jenkins builds (especially via Jenkinsfile) for better consistency between CI and local builds.
We'll have to ensure zsh is available in our build nodes.
We'll need to enhance the 'build' script with more options to support Jenkinsfile's specific needs (eg run functional tests without GWT, javac, kotlinc, npm install, etc - see ftOpts in Jenkinsfile - perhaps an option called --skip-compile or --integration-tests-only). Essentially anything in Jenkinsfile related to Maven or its options should be handled by the script, and the Jenkinsfile should become simpler as a result.
We'll have to review the options used by the 'build' script against the Maven options currently used by Jenkinsfile, and decide which differences are deliberate, and which are accidental.