Chemical bath deposition (CBD) is a technique where reduction of precursors occurs with the aid of a complexing agent thereby forming a thin solid film onto a substrate. In general, the film is expected to be present even on the walls of electrolyte containers (often a glass beaker) since it doesn't really require a specific substrate unless intended for a specific purpose. Typically CBD process depends mainly on concentration of precursor species, type and concentration of complexing agent, pH and temperature of the bath. The reaction between the precursor and complexing agent at that particular temperature aids the formation of thin-film.
An article about CBD of CdS films with required reactions is attached below as an example. Hope this helps.