in src/com/epam/edp/Job.groovy [119:145]
def initDeployJob() {
this.pipelineName = script.JOB_NAME.split("-cd-pipeline")[0]
this.stageName = script.JOB_NAME.split('/')[1]
def codebaseBranchList = [:]
def tmpAccessToken = getTokenFromAdminConsole()
def stageContent = getStageFromAdminConsole(this.pipelineName, stageName, "cd-pipeline", tmpAccessToken)
def pipelineContent = getPipelineFromAdminConsole(this.pipelineName, "cd-pipeline", tmpAccessToken)
this.codebasesList = getCodebaseFromAdminConsole(pipelineContent.codebaseBranches.appName, tmpAccessToken)
this.applicationsToPromote = pipelineContent.applicationsToPromote
this.qualityGates = stageContent.qualityGates
this.stageWithoutPrefixName = "${this.pipelineName}-${stageName}"
this.deployProject = "${this.edpName}-${this.pipelineName}-${stageName}"
this.ciProject = getParameterValue("CI_NAMESPACE")
this.deployTimeout = getParameterValue("DEPLOY_TIMEOUT", "300s")
this.manualApproveStageTimeout = getParameterValue("MANUAL_APPROVE_TIMEOUT", "10")
stageContent.applications.each() { item ->
codebaseBranchList["${item.name}"] = ["inputIs" : item.inputIs,
"outputIs": item.outputIs]
}
codebasesList.each() { codebase ->
codebase.inputIs = codebaseBranchList["${codebase.name}"].inputIs.replaceAll("[^\\p{L}\\p{Nd}]+", "-")
codebase.outputIs = codebaseBranchList["${codebase.name}"].outputIs.replaceAll("[^\\p{L}\\p{Nd}]+", "-")
setCodebaseTags(codebase)
}
}