Elastic and plastic properties of materials and phase transitions at extreme conditions vary with both hydrostatic pressure and deviatoric stress. To generate and measure controlled deviatoric stress at pressures beyond those accessible with large volume differential and rotational presses and optical access for spectroscopy, experiments tested the combination of diamond anvil cell and thin film technology. Thin films of polycrystalline Cr-doped Al2O3 ruby were prepared using pulsed laser deposition on single-crystal substrates of either Al2O3 sapphire or yttria-stabilized cubic zirconia for contrasting initial film stress, and loaded in diamond anvil cells for confining stress. The piezospectroscopic response of the ruby films demonstrates consistently higher deviatoric stress in the film on zirconia relative to the film on the control sapphire, and an increase in deviatoric stress with applied load. Complementary synchrotron X-ray diffraction of the zirconia substrate confirmed that no pressure-induced phase transitions impacted the stress state of the ruby film, but differences in compressibility of film and substrate result in changes in film stress analogous to thermal expansion mismatch. This technique may be applied to evaluate elastic and plastic response of thin films of a variety of materials under extreme stress.