Small refactoring Jenkins script