small fix

This commit is contained in:
Roberto Cirillo 2022-09-30 17:15:45 +02:00
parent 3cf615d21c
commit b30a726d2a
1 changed files with 22 additions and 11 deletions

25
Jenkinsfile vendored
View File

@ -107,19 +107,30 @@ pipeline {
println "Going to check the deploy file in ${DEPLOY_FILE_ROOT_FOLDER}"
//def components =getComponentsFromCSVDir("${WORKSPACE}/CD")
//def components = readCSV file: 'CD/deploy.csv'
readCSV(file: 'CD/deploy.csv').each { line , count->
if (line.toString().startsWith('#'))
return
//readCSV(file: 'CD/deploy.csv').each { line , count->
// if (line.toString().startsWith('#'))
// return
// line.get(0);
// def fields = line.toString().split(',')
// def components.add([
// name : line.get(0),
// version : line.get(1),
// host : line.get(2)
// ]
// )
// }
def records = readCSV file: 'CD/deploy.csv'
for (def record : records) {
println("Processing record: "+record)
if (record.toString().startsWith('#')) return;
def components.add([
name : line.get(0),
version : line.get(1),
host : line.get(2)
name : record.get(0),
version : record.get(1),
host : record.get(2)
]
)
}
//def records = readCSV file: 'CD/deploy.csv'
println(components)
if (components.size() > 0) {
def componentSet=components.toSet();