The key tool that makes resonance applicable to many general situations is the concept of Fourier series.
It's mathematically much easier to analyse the motion of oscillators when the driving force is simple harmonic. You can work out how much the oscillator is driven and what the steady state amplitude is. In fact, for a oscillator with natural frequency $\omega_0$ and driven by a force $F=F_0\sin{\omega t}$, and damped by a factor 2$\gamma$, the equation of motion is
$$
\ddot{x} + 2\gamma\dot{x} + \omega_0x = F_0\sin{\omega t},
$$
This leads to a resulting amplitude of
$$
\frac{F_0/m}{\sqrt{(\omega_0^2 - \omega^2)^2 + 4\gamma^2\omega^2}},
$$
at the same frequency as the driving force.
So the first thing to realise is that you don't need a driving force that's exactly at the natural frequency - the closer to the natural frequency the higher your resulting amplitude will be, but it's not the case that there's no response at all until your driving force is exactly the same as the natural frequency. You can work out the response to your oscillator of any driving frequency, and there is no sharp point where the oscillator is 'in resonance': it's affected to a driving force of any frequency, to a larger or smaller degree.
So if you have multiple frequencies driving your oscillator, you can add them up (as the oscillator is linear), and get some complex motion that's the sum of many sinusoidal responses of various amplitudes. But it's not too hard to get a computer to just add them all up.
Now we can work out the response of the oscillator to any sinusoidal driving force, or any sum of sinusoids. The real power comes when we realise we can (more or less) represent any periodic function as a sum of sinusoids. For instance, take the function in black below, a square wave: 
Also on the sketch is outlined several sums of
$$
\sin{\omega t} + \frac{1}{3}\sin{3\omega t} + \frac{1}{5}\sin{5\omega t} + \ldots
$$
As you can see, the sum quickly becomes identical to the square wave, and in actual fact you can prove that in the limit they are the same function. In general we can work out what combination of sinusoids make up any periodic function.
So the fact that the mechanics of resonance are often only worked out using sinusoidal waves doesn't matter, as it's possible to express any complicated force as a combination of sinusoids, then just add up the effect that these components have on the oscillator individually to get the total.
For your example with the bucket of water, to work out the motion of the water, you would need to examine the force on the bucket due to the holes, and see what sinusoidal components there are at each frequency. Working through the analysis shows that if you want the most response from the bucket, you should ride such that you hit the holes at a frequency equal to the natural frequency of the bucket. But you can also get strong responses if you cycle such that you're at e.g 1/2, 1/3 etc of the bucket frequency, because of the distribution of the impact's sinusoidal components.