From c99b667698b492985b5c1e4b9abe1177870009c2 Mon Sep 17 00:00:00 2001 From: "roberto.cirillo" Date: Tue, 4 Oct 2022 16:04:32 +0200 Subject: [PATCH] clean unused methods --- Jenkinsfile | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1a875bb..12eb36c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -237,29 +237,6 @@ pipeline { } } - -//parse a csv file formatted in this way: ComponentName,ComponentVersion, ComponentHost -def getComponentsFromCSV(def deployList) { - def components = [] - if (fileExists("${deployList}")) { - echo 'file found' - readFile("${deployList}").split('\n').each { line, count-> - if (line.startsWith('#')) - return - def fields = line.split(',') - components.add([ - name : fields[0], - version : fields[1], - host : fields[2] - ] - ) - } - } else { - echo ' File Not found. Failing.' - } - return components -} - //launch ansible deploy def deploy(String service, String version, String host){ def now = new Date(); @@ -281,18 +258,3 @@ def checkup(String service, String version, String host){ esac """) } -//clean and update the local deploy file -def cleanup(def DEPLOY_FILE, def BACKUP_FILE){ - sh ''' - echo "cleanup $DEPLOY_FILE"; - if [ -f ${DEPLOY_FILE} ]; then - if [ -f ${BACKUP_FILE} ]; then - echo "backup found: ${BACKUP_FILE} going to replace it"; - rm ${BACKUP_FILE}; - fi - mv ${DEPLOY_FILE} ${BACKUP_FILE}; - else - echo "deploy file empty" - fi - ''' -} \ No newline at end of file