From b30a726d2ae856095fa7dba58d2e7bf92bfd7eb7 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 30 Sep 2022 17:15:45 +0200 Subject: [PATCH] small fix --- Jenkinsfile | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a7e44aa..1228837 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' + // 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 : record.get(0), + version : record.get(1), + host : record.get(2) + ] + ) + + } println(components) if (components.size() > 0) { def componentSet=components.toSet();