While there are elements of truth to this, the reality is more nuanced. They have been promoting Hamas over moderate elements, and have looked the other way as Qatar has provided money in briefcases to Hamas. Israel ignored warnings from their own intel as well as civilians who noticed that Hamas were increasing training exercises on the border from listening to radio communications. The explicit goal of promoting Hamas was not to promote an attack, but to divide and rule the Palestinians: by showing Hamas as an example of "this is what would happen if we left the West Bank" and by exacerbating the rivalry, they used this to exert control over the Palestinian Authority.
https://www.thenation.com/article/world/why-netanyahu-bolste...