[JENKINS-18446]: Check optional env variable if ws should be cleaned up.

Signed-off-by: Florin Hillebrand <florin.hillebrand@streamunlimited.com>