in src/com/epam/digital/data/platform/pipelines/stages/impl/lowcode/UploadBusinessProcessChanges.groovy [29:53]
void run() {
ArrayList<String> changedBPFiles
if (context.getParameterValue("FULL_DEPLOY", "false").toBoolean()) {
changedBPFiles = context.registryRegulations.getAllRegulations(RegulationType.BUSINESS_PROCESS).join(",").tokenize(',') +
context.registryRegulations.getAllRegulations(RegulationType.BUSINESS_RULE).join(",").tokenize(',')
} else {
changedBPFiles = context.registryRegulations.getChangedStatusOrFiles("plan",
"upload-business-process-changes", "--file-detailed ${context.getWorkDir()}/${RegulationType.BUSINESS_PROCESS.value}," +
"${context.getWorkDir()}/${RegulationType.BUSINESS_RULE.value}")
}
if (changedBPFiles) {
String token = context.keycloak.getAccessToken(context.jenkinsDeployer)
changedBPFiles.each {
if (!it.contains(".gitkeep")) {
deploy(it, token)
}
}
context.registryRegulations.getChangedStatusOrFiles("save",
"upload-business-process-changes", "--file-detailed ${context.getWorkDir()}/${RegulationType.BUSINESS_PROCESS.value}," +
"${context.getWorkDir()}/${RegulationType.BUSINESS_RULE.value}")
} else {
context.logger.info("Skip ${RegulationType.BUSINESS_PROCESS.value} and ${RegulationType.BUSINESS_RULE.value} files deploy due to empty change list")
}
}