generated from gCubeCI/Pipeline-Docker-Template
fix parseCSV function
This commit is contained in:
parent
e7677ab8b2
commit
49b7269935
|
@ -157,20 +157,26 @@ def parseDeployComponent(def deployList) {
|
|||
}
|
||||
|
||||
def parseCSVList(def deployList) {
|
||||
def components = []
|
||||
if (fileExists("${deployList}")) {
|
||||
echo ' file found'
|
||||
readFile("${deployList}").split('\n').each { line, count->
|
||||
def fields = line.split(',')
|
||||
for(String item: fields) {
|
||||
println item
|
||||
println ' you are parsing line : ' + count
|
||||
}
|
||||
components.add([
|
||||
name : fields[0],
|
||||
version : fields[1]
|
||||
]
|
||||
)
|
||||
// for(String item: fields) {
|
||||
// println item
|
||||
// println ' you are parsing line : ' + count
|
||||
// }
|
||||
|
||||
}
|
||||
} else {
|
||||
echo ' File Not found. Failing.'
|
||||
}
|
||||
|
||||
return components
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue