clean unused methods

This commit is contained in:
Roberto Cirillo 2022-10-04 16:04:32 +02:00
parent 4508798749
commit c99b667698
1 changed files with 0 additions and 38 deletions

38
Jenkinsfile vendored
View File

@ -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 //launch ansible deploy
def deploy(String service, String version, String host){ def deploy(String service, String version, String host){
def now = new Date(); def now = new Date();
@ -281,18 +258,3 @@ def checkup(String service, String version, String host){
esac 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
'''
}