Ideally, I would want to create a horizontally tileable vector of this "shape", with sides that match seamlessly when connected. Than drag this shape into the Brushes palette. You'd probably want to select an Art brush, and set the size to Proportional. The 'Proportional' setting tells the brush to stretch the image, rather than repeat it.
Turning your image into a brush will allow the image to follow the curves and angles of a path.
Now you can select your path and apply the brush to it. You can continue to modify the settings of the brush by clicking the Options button in the Brushes palette, with the brushed object selected.
If you are trying to do this to a raster image, you could try using the same technique.