jenkins tools: improvements to jenkins rotation script