From a3d11b44c512f1dcf903b76fd9fb79310d7b8c90 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 26 Apr 2022 16:37:28 +0200 Subject: [PATCH] fixing parsing function --- Jenkinsfile | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a80d2e..ccf7964 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,12 +145,12 @@ pipeline { //a non CPS method is necessary for the usage of splitEachLine() @NonCPS -def parseDeployComponentNex(def deployList) { +def parseDeployComponent(def deployList) { println "Going to parsing file ${deployList}" def components = [] "${deployList}".splitEachLine(',') { columns -> - if (columns[0].startsWith('#') || columns[0].startsWith('Component')) - return +// if (columns[0].startsWith('#') || columns[0].startsWith('Component')) +// return components.add([ name : columns[1], version : columns[2] @@ -159,21 +159,3 @@ def parseDeployComponentNex(def deployList) { } return components } - -//a non CPS method is necessary for the usage of splitEachLine() -@NonCPS -def parseDeployComponent(def deployList) { - def components = [] - "${deployList}".splitEachLine(',') { columns -> - if (columns[0].startsWith('#') || columns[0].startsWith('GroupID')) - return - components.add([ - name : columns[1], - version : columns[2], - gitRepo : columns[3], - commitID: columns[4] - ] - ) - } - return components -} \ No newline at end of file