diff --git a/Jenkinsfile b/Jenkinsfile index c5240be..ec4161d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -122,27 +122,16 @@ pipeline { def records = readCSV file: 'CD/deploy.csv' for (def record : records) { println("Processing record: "+record) - // if (record.toString().startsWith('#')) return; println ("field 0 "+record.get(0)) println ("field 1 "+record.get(1)) println ("field 2 "+record.get(2)) - - } - println(components) - if (components.size() > 0) { - def componentSet=components.toSet(); - for (component in componentSet) { - stage(component){ - println "Deploy on going of component: $component" - catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { - checkup("${component.name}", "${component.version}", "${component.host}"); - deploy("${component.name}", "${component.version}", "${component.host}"); - } - } + stage(record.get(0)){ + println "Deploy on going of component: record.get(0)" + catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { + checkup(record.get(0), record.get(1), record.get(2)); + deploy(record.get(0), record.get(1), record.get(2)s); + } } - }else{ - println "No components found" - } } cleanup(DEPLOY_FILE,BACKUP_FILE); }