I want to fail-fast on Gerrit triggered Jenkins jobs when the changes are outdated and they need rebasing by adding a piece of code at the start of the job that triggers and error: "Rebase your change first."
You can find the list of Jenkins variables defined by Gerrit plugin at What environment variables are passed go Jenkins when using the Gerrit Trigger Plugin?