When do the lift and drag vectors contribute a force component along a glider's path of travel as seen from the ground? It is often said that the lift vector helps to propel a glider forwards.  The lift vector has no component acting parallel to the glider's trajectory through the airmass, but in many cases the lift vector does have a component acting parallel to the glider's trajectory as seen from the ground.  Note that for a given airspeed, the direction of the glider's trajectory through the airmass-- i.e. the direction that is exactly opposite to the "relative wind" that is "felt" by the glider-- is not affected by sustained updrafts, downdrafts, headwind, or tailwinds.  But this is not true of the glider's trajectory as seen from the ground.  A glider in a powerful mountain wave updraft may be rising straight up as seen from the ground, while the trajectory through the airmass will still be the normal glide path that would be obtained at whatever airspeed the glider is flying at.

Under what circumstances does the lift vector of a glider contribute a force component along the glider's path of travel (trajectory) as seen from the ground?

Under what circumstances does the drag vector of a glider contribute a force component along the glider's path of travel (trajectory) as seen from the ground?

Likewise for a powered airplane.

Note -- to avoid any possible ambiguity, please be aware that this question is using the word "lift" exclusively to mean an aerodynamic force generated by the aircraft, not to mean rising air.  These are two completely different things.  

Note -- the scope of this question is meant to be confined to linear (but not necessarily horizontal) straight-line flight with constant airspeed and groundspeed, at least over the short term.  We're assuming the glider (or airplane) is flying in an airmass that is locally uniform. In other words, if the glider has entered a thermal updraft or penetrated through an abrupt wind shear or flown from sinking air into a ridge updraft or wave updraft, we're assuming that it has been in the new airmass long enough to come into equilibrium, so that net force is zero for the time being.  This is not a question about "dynamic soaring" as practiced by the albatross over the open ocean, r.c. glider pilots flying in loops on the lee side of the hill, someone trying to put into practice Taras Kiceniuk's ideas about exploiting the boundaries between still air and downdrafts as a source of energy, etc.  Those subjects are worthy of an ASE question, or many questions, but this is not that question.
In thermals.

More precisely: Every time when the updraft strength increases. The glider will continue on its original path due to inertia while the airflow will have a positive angle when referenced to the path of travel. Now the aerodynamic force will point slightly forward and accelerate the glider.

Experienced pilots use this by pulling more than 1 g when flying into a thermal and less when updraft strength decreases. This helps them to gain some more energy from the rising air.

Drag is per definition the part of aerodynamic forces parallel to the flow direction, so for drag the answer is: Always. With changes in vertical airspeed, the drag component parallel to the direction of movement will merely change with the cosine of the angle between the aerodynamic and the kinetic coordinate systems.

If you insist on excluding changes in vertical air speed, your question will have no answer regarding lift.