Move workspace cleaning in template job