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 parseCSVList(def deployList) {
|
||||||
|
def components = []
|
||||||
if (fileExists("${deployList}")) {
|
if (fileExists("${deployList}")) {
|
||||||
echo ' file found'
|
echo ' file found'
|
||||||
readFile("${deployList}").split('\n').each { line, count->
|
readFile("${deployList}").split('\n').each { line, count->
|
||||||
def fields = line.split(',')
|
def fields = line.split(',')
|
||||||
for(String item: fields) {
|
components.add([
|
||||||
println item
|
name : fields[0],
|
||||||
println ' you are parsing line : ' + count
|
version : fields[1]
|
||||||
}
|
]
|
||||||
|
)
|
||||||
|
// for(String item: fields) {
|
||||||
|
// println item
|
||||||
|
// println ' you are parsing line : ' + count
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo ' File Not found. Failing.'
|
echo ' File Not found. Failing.'
|
||||||
}
|
}
|
||||||
|
return components
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue