package com.freeleaps.devops class SourceFetcher { def steps SourceFetcher(steps) { this.steps = steps } def fetch(configurations) { if (configurations.serviceGitRepo == null || configurations.serviceGitRepo.isEmpty()) { steps.error("serviceGitRepo is required") } if (configurations.serviceGitBranch == null || configurations.serviceGitBranch.isEmpty()) { steps.error("serviceGitBranch is required") } steps.git branch: configurations.serviceGitBranch, credentialsId: 'git-bot-credentials', url: configurations.serviceGitRepo } }