I would like to trigger a Jenkins build when the following conditions are met:
The git plugin sets several environment variables you can use in your scripts:
GIT_COMMIT- SHA of the current
GIT_PREVIOUS_COMMIT- SHA of the previous built commit from the same branch
If these are the same, there was no change. Use them in the Conditional BuildStep Plugin to decide whether your nightly shall run or not.